import type { InertiaLinkProps } from '@inertiajs/vue3';
import type { LucideIcon } from '@lucide/vue';

export type BreadcrumbItem = {
    title: string;
    href: NonNullable<InertiaLinkProps['href']>;
};

export type NavItem = {
    title: string;
    href: NonNullable<InertiaLinkProps['href']>;
    icon?: LucideIcon;
    isActive?: boolean;
};

/**
 * Item menu yang dikirim server (via shared prop `nav`).
 * `icon` berupa nama Lucide (string) karena komponen tidak bisa diserialisasi
 * lewat Inertia — di-resolve di frontend via `resolveNavIcon`.
 */
export type ServerNavItem = {
    label: string;
    route: string;
    href: string;
    icon: string;
};

export type NavSection = {
    label: string;
    items: ServerNavItem[];
};
