export type AuthUser = {
  id: string;
  phone: string;
  username: string;
  roles: string[];
}

export type LoginResponse = {
  status: number;
  message: string;
  data: {
    mfa_required: boolean;
    mfa_session_token?: string;
    user?: AuthUser;
    access_token?: string;
    refresh_token?: string;
  };
}

export type MfaSetupResponse = {
  status: number;
  message: string;
  data: {
    totp_uri: string;
    secret: string;
    qr_code_base64: string;
  };
}
export type MfaVerifyResponse = {
  status: number;
  message: string;
  data: {
    backup_codes: string[];
  };
  meta: {
    request_id: string;
    timestamp: string;
  };
}

export interface Patient {
  name: string;
  age: number;
  gender: string;
  triage_level: string;
  symptoms: { name: string; duration_minutes: number }[];
}

export interface Incident {
  id: string;
  category: string;
  triage_level: string;
  severity: string;
  caller_id: string;
  organisationId: string | null;
  gps_lat: number;
  gps_lon: number;
  address: string;
  patients: Patient[];
  notes: string;
  guest_name?: string | null;
  guest_phone?: string | null;
  status: string;
  assigned_vehicle: string | null;
  eta_seconds: number | null;
  createdAt: string;
  updatedAt: string;
}


export interface ApiResponse<T> {
  status: number;
  message: string;
  data: T;
  meta: {
    request_id: string;
    timestamp: string;
    next_cursor?: string | null;
    total_count?: number;
  };
}
