module.exports.menuDefine = function(permission = []) {
	let menu = [];

	menu.push({
	    header: true,
	    title: 'Main Navigation',
	});
    /////////////////////////////////////////////////////
	menu.push({
        title: 'Dashboard',
        icon: 'fa fa-home',
        child: [
            {
                href: '/',
                title: 'Analytics',
            },
        ]
    });
  
    /////////////////////////////////////////////////////
    if (permission.includes('view contract_template')) {
            let admin_access_menu = {};
            admin_access_menu = {
                title: 'Contract Template',
                icon: 'fa fa-copy',
                child: [
                    {
                        href: '/contract-template/list',
                        title: 'List',
                    },
                ]
            };
            menu.push(admin_access_menu);
    }
    /////////////////////////////////////////////////////
    if (permission.includes('view contract')) {
            let admin_access_menu = {};
            admin_access_menu = {
                title: 'Contract',
                icon: 'fa fa-file-contract',
                child: [
                    {
                        href: '/contract/list',
                        title: 'List',
                    },
                ]
            };
            menu.push(admin_access_menu);
    }
    /////////////////////////////////////////////////////
   
	return menu;
};
