import { individualSignupExtras } from "./individualSignupExtrasRules";
import { emptyTrainerRequestValues } from "@/features/trainer/trainerRequest";
import { DEFAULT_DIAL_CODE } from "@/data/defaultCountry";

/**
 * The individual sign-up form's fields and their empty values.
 *
 * It lives here, outside the component, so the field groups the form is
 * assembled from can type their Formik props off it instead of `any`.
 */
export const individualInitialValues = {
  ...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: "",
  termsAccepted: false,
  dob: "",
  civil_id: "",
  passport_number: "",
  /**
   * Holds the combined nationality/residency choice — see
   * `nationalityResidencyOptions`. `handleSubmit` splits it into the API's
   * `nationality` + `residency_status` pair.
   */
  nationality: "",
  /** BE-77 — optional; only asked of non-Kuwaitis. */
  speaks_arabic: "",
  health_concerns: "",
  profile_pic: [] as File[],
  receive_reminder_emails: true,
  interest_ids: [] as string[],
  emergency_contact_name: "",
  emergency_contact_phone: "",
  emergency_contact_country_code: DEFAULT_DIAL_CODE,
  emergency_contact_civil_id: "",
  emergency_contact_relationship: "",
  /**
   * BE-95. Off: the public profile shows the username and the real name
   * appears only on certificates. A trainer request turns it on — an
   * approved trainer's real name is public.
   */
  show_real_name: false,
  /** «هل ترغب في تقديم فرص تطور؟» — reveals the trainer block. */
  wants_trainer: false,
  ...emptyTrainerRequestValues,
};

export type IndividualRegistrationValues = typeof individualInitialValues;
