import { mainNavItem } from '@admin/types';
import { NotebookIcon, CheckSquare, BellRing } from 'lucide-react';

export const productivityMenuItems = (module: any) => {

    // Return an empty array if module or module_menu is missing
    if (!module || !module.module_menu) return [];

    // Check if the first menu is active (adjust index if needed)
    const isMenuActive = module.module_menu[0]?.is_active;

    return isMenuActive
        ? [
            {
                title: 'Tasks Management',
                icon: CheckSquare,
                url: route('task.index'),
            },
            {
                title: 'Reminders',
                icon: BellRing,
                url: route('reminder.index'),
            },
            {
                title: 'Notes',
                icon: NotebookIcon,
                url: route('note.index'),
            },
        ]
        : [];
};

