import { Config } from 'ziggy-js';

export interface User {
    id: number;
    name: string;
    email: string;
    email_verified_at: string | null;
    roles: string[];
    permissions: string[];
    outlet_id?: number | null;
}

export interface Settings {
    site_name: string;
    site_logo: string | null;
    site_favicon: string | null;
    site_description: string | null;
    thermal_logo?: string | null;
    qris_image?: string | null;
    version?: string;
}

export type PageProps<
    T extends Record<string, unknown> = Record<string, unknown>,
> = T & {
    auth: {
        user: User;
    };
    settings: Settings;
    ziggy: Config & { location: string };
    flash: {
        success: string | null;
        error: string | null;
    };
};
