export type Locale = 'pl' | 'en';
export type ThemeMode = 'system' | 'light' | 'dark';
export type Site = { site_key: string; site_label: string; site_type?: string; is_planned?: boolean; all?: boolean };
export type User = { id: number; email: string; display_name: string; role_slug: string; role_name?: string; preferred_locale?: Locale; preferred_theme?: ThemeMode };
export type ModuleItem = { module_key: string; label: string; icon?: string; domain_key?: string; route_key?: string; description?: string };
export type BootstrapPayload = { user: User; locale: Locale; theme: ThemeMode; site: Site; sites: Site[]; modules: ModuleItem[]; safety: Record<string, boolean>; app: { api_version: string; minimum_version?: string; latest_version?: string; force_update?: boolean } };
export type WorkItem = { id: number; work_uid?: string; work_label: string; work_body?: string; role_key?: string; priority: string; status: string; due_at?: string | null; patient_id?: number | null; patient_label?: string | null; case_uid?: string | null; source_engine?: string };
export type Patient = { id: number; public_code: string; first_name: string; last_name: string; email?: string; phone?: string; date_of_birth?: string | null; status_color?: string; case_uid?: string | null; current_stage?: string | null; go_live_gate_status?: string | null; site_key?: string | null };
export type TimelineItem = { id: number; item_key: string; title: string; status: string; visibility_status?: string; patient_label?: string; stage_key?: string; updated_at?: string };
export type MessageThread = { id: number; subject: string; status: string; priority: string; unread_count: number; last_message_at?: string; patient_label?: string };
export type Message = { id: number; subject?: string; body: string; direction: string; status: string; sender_label?: string; created_at: string };
export type OrCase = { id: number; case_spine_id?: number; patient_label?: string; procedure_label?: string; room_label?: string; start_at?: string; gate_status?: string; readiness_status?: string; blocker_count?: number; warning_count?: number; current_stage?: string };
export type NotificationItem = { id: number; notification_uid: string; category: string; title: string; body: string; priority: string; status: string; deep_link?: string; created_at: string; read_at?: string | null };
export type ApiPage<T> = { items: T[]; page: number; page_size: number; total: number; has_more: boolean };
