import { mainNavItem } from '@/types';
import { Users, Share2 } from 'lucide-react';
import { route as routeHelper } from 'ziggy-js';

// Translation helper is globally injected
declare function __(key: string): string;

export interface TenabledAppModules {
    apps: {
        [key: string]: boolean;
    };
    modules: {
        [key: string]: boolean;
    };
}


// Helper to safely get route URL
const safeRoute = (routeName: string, fallback: string = '#'): string => {
    try {
        return routeHelper(routeName);
    } catch {
        return fallback;
    }
};

export const ContactMenuItems = (): mainNavItem[] => {
    const items: mainNavItem[] = [];
        items.push({
            title: __("Contacts"),
            icon: Share2,
            isActive: false,
            items: [
                {
                    title: __("Supplier"),
                    icon: Users,
                     url:route('contact.supplier.index'),
                    isActive: false,
                },
                {
                    title: __("Customer"),
                    icon: Users,
                    url:route('contact.customer.index'),
                    isActive: false,
                },
                {
                    title: __("Parent"),
                    icon: Users,
                    url:route('contact.parent.index'),
                    isActive: false,
                },
            ],
        });

    return items;
};


