import { InertiaLinkProps } from "@inertiajs/react";
import { LucideIcon } from "lucide-react";
import { User } from "./user";
import { Konfigurasi } from "./konfigurasi";

export interface Auth {
    user: User;
}

export interface BreadcrumbItem {
    title: string;
    href?: string;
    active?: boolean;
}

export interface NavGroup {
    title: string;
    items: NavItem[];
}

export interface NavItem {
    title: string;
    href: NonNullable<InertiaLinkProps["href"]>;
    icon?: LucideIcon | null;
    isActive?: boolean;
}

export interface ValidationErrors {
    [key: string]: string | string[];
}

export interface SharedData {
    name: string;
    quote: { message: string; author: string };
    auth: Auth;
    errors: ValidationErrors;
    konfigurasi: Konfigurasi;
    flash: {
        success?: string;
        error?: string;
    };
    sidebarOpen: boolean;
    [key: string]: unknown;
}

export interface MetaTags {
    title: string;
    description: string;
}

export interface MetaPagination {
    current_page: number;
    from: number;
    to: number;
    per_page: number;
    total: number;
    last_page: number;
}

export interface FlashProps {
    success?: string;
    error?: string;
    [key: string]: any;
}
interface SelectOption {
    value: number;
    label: string;
}
interface SelectOptionString {
    value: string;
    label: string;
}
