<?php
if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); }

require_once( $plugin->absPath . '/toolbar.' . $plugin->element . '.html.php' );

switch ( $action ) {
	case 'categories':
		switch ( $function ) {
			case 'new':
			case 'edit':
			case 'save':
				cbgjMenu::showCategoryEdit();
				break;
			case 'show':
			default:
				cbgjMenu::showCategories( $function, $user, $plugin );
				break;
		}
		break;
	case 'groups':
		switch ( $function ) {
			case 'new':
			case 'edit':
			case 'save':
				cbgjMenu::showGroupEdit();
				break;
			default:
				cbgjMenu::showGroups( $function, $user, $plugin );
				break;
		}
		break;