import { individualSignupExtras } from "./individualSignupExtrasRules";
import { DEFAULT_DIAL_CODE } from "@/data/defaultCountry";

/**
 * The "join us" volunteer modal's Formik values.
 *
 * Lifted out of `useRegisterVolunteerModal` so the field components can be
 * typed against it. They previously took `values: any`, which meant a child
 * reading a field this object does not define got `undefined` at runtime with
 * nothing failing to compile.
 */
export const registerVolunteerInitialValues = {
  ...individualSignupExtras,
  first_name: "",
  last_name: "",
  email: "",
  password: "",
  phone_number: "",
  /* Kuwait by default, declared here rather than seeded by
     `CountryCodeSelect` from a mount effect. See `DEFAULT_DIAL_CODE`. */
  country_code: DEFAULT_DIAL_CODE,
  nickname: "",
  gender: "",
  civil_id: "",
  passport_number: "",
  /** Combined nationality/residency choice — split on submit. */
  nationality: "",
  speaks_arabic: "",
  health_concerns: "",
  interest_ids: [] as string[],
  termsAccepted: false,
  dob: "",
  emergency_contact_name: "",
  emergency_contact_phone: "",
  emergency_contact_country_code: DEFAULT_DIAL_CODE,
  emergency_contact_civil_id: "",
  emergency_contact_relationship: "",
};

export type RegisterVolunteerValues = typeof registerVolunteerInitialValues;
