import {
    Coins,
    Landmark,
    Layers,
    LayoutGrid,
    LayoutList,
    Lock,
    MapPin,
    Megaphone,
    Menu as MenuIcon,
    Palette,
    Receipt,
    Settings,
    Shield,
    UserCog,
    Users,
    type LucideIcon,
} from '@lucide/vue';

/**
 * Memetakan nama ikon (string, dari server) ke komponen Lucide.
 * Tambahkan mapping baru di sini saat ada menu baru dengan ikon baru.
 */
const iconMap: Record<string, LucideIcon> = {
    'layout-grid': LayoutGrid,
    megaphone: Megaphone,
    coins: Coins,
    receipt: Receipt,
    layers: Layers,
    'map-pin': MapPin,
    'layout-list': LayoutList,
    landmark: Landmark,
    users: Users,
    shield: Shield,
    menu: MenuIcon,
    'user-cog': UserCog,
    lock: Lock,
    palette: Palette,
    settings: Settings,
};

export function resolveNavIcon(name: string): LucideIcon {
    return iconMap[name] ?? LayoutGrid;
}
