/**
 * Types para Pacientes
 */

export interface Patient {
  id?: string;
  full_name: string;
  cpf: string;
  email: string;
  phone_mobile: string;
  birth_date?: string | null;
  social_name?: string | null;
  sex?: string | null;
  blood_type?: string | null;
  weight_kg?: number | null;
  height_m?: number | null;
  bmi?: number | null;
  street?: string | null;
  number?: string | null;
  complement?: string | null;
  neighborhood?: string | null;
  city?: string | null;
  state?: string | null;
  cep?: string | null;
  created_at?: string;
  updated_at?: string;
  created_by?: string;
}

export interface CreatePatientInput {
  full_name: string;
  cpf: string;
  email: string;
  phone_mobile: string;
  birth_date?: string | null;
  social_name?: string | null;
  sex?: string | null;
  blood_type?: string | null;
  weight_kg?: number | null;
  height_m?: number | null;
  street?: string | null;
  number?: string | null;
  complement?: string | null;
  neighborhood?: string | null;
  city?: string | null;
  state?: string | null;
  cep?: string | null;
}

export interface RegisterPatientInput {
  email: string;
  full_name: string;
  phone_mobile: string;
  cpf: string;
  birth_date?: string;
  redirect_url?: string; // URL para redirecionar após clicar no magic link
}

export interface RegisterPatientResponse {
  user_id: string;
  patient_id: string;
  message: string;
}

export interface UpdatePatientInput {
  full_name?: string;
  cpf?: string;
  email?: string;
  phone_mobile?: string;
  birth_date?: string | null;
  social_name?: string | null;
  sex?: string | null;
  blood_type?: string | null;
  weight_kg?: number | null;
  height_m?: number | null;
  street?: string | null;
  number?: string | null;
  complement?: string | null;
  neighborhood?: string | null;
  city?: string | null;
  state?: string | null;
  cep?: string | null;
}

export interface PatientFilters {
  full_name?: string;
  cpf?: string;
  email?: string;
  phone_mobile?: string;
}
