<?php

defined('BASEPATH') or exit('No direct script access allowed');

/*
Module Name: Menu builder
Description: Menu builder
Version: 1.0.4
*/

define('MENU_BUILDER_MODULE_NAME', 'menu_builder');

hooks()->add_action('admin_init', 'mb_permissions');
hooks()->add_action('admin_init', 'mb_module_init_menu_items', 30);
define('VERSION_MB', 104);

/**
 * Register activation module hook
 */
register_activation_hook(MENU_BUILDER_MODULE_NAME, 'mb_module_activation_hook');
$CI = &get_instance();

/**
 * team password module activation hook
 */
function mb_module_activation_hook()
{
    $CI = &get_instance();
    //require_once(__DIR__ . '/install.php');
}

/**
 * Register language files, must be registered if the module is using languages
 */
register_language_files(MENU_BUILDER_MODULE_NAME, [MENU_BUILDER_MODULE_NAME]);

/**
 * Init goals module menu items in setup in admin_init hook
 *
 * @return null
 */
function mb_module_init_menu_items()
{
    $CI = &get_instance();


}

/**
 * okr permissions
 */
function mb_permissions()
{
    $capabilities                 = [];
    $capabilities['capabilities'] = [
      'view_own' => _l('permission_view'),
      'view'     => _l('permission_view') . '(' . _l('permission_global') . ')',
      'create'   => _l('permission_create'),
      'edit'     => _l('permission_edit'),
      'delete'   => _l('permission_delete'),
    ];

    //register_staff_capabilities('menu_builder', $capabilities, _l('mb'));
}
