//interface class array object {name string ,id number}

import type { childrenFamily } from "@/modules/04_registry/interface/response/Family";
interface ChangeActive {
  name: string;
  id: number;
}

//ข้อมูลส่วนตัว
interface Information {
  idCard: string | null;
  prefix: string | null;
  prefixId: string | null;
  fullName: string | null;
  firstname: string | null;
  lastname: string | null;
  nationality: string | null;
  race: string | null;
  dateOfBirth: Date | null;
  age: string | null;
  telephone: string | null;
  gender: string | null;
  genderId: string | null;
  relationship: string | null;
  relationshipId: string | null;
  bloodGroup: string | null;
  bloodGroupId: string | null;
  religion: string | null;
  religionId: string | null;
}

interface Family {
  prefixC: string | null; // couple
  prefixIdC: string | null;
  firstnameC: string | null;
  lastnameC: string | null;
  lastnameCOld: string | null;
  occupationC: string | null;
  prefixM: string | null; // male
  prefixIdM: string | null;
  firstnameM: string | null;
  lastnameM: string | null;
  occupationM: string | null;
  prefixF: string | null; // female
  prefixIdF: string | null;
  firstnameF: string | null;
  lastnameF: string | null;
  occupationF: string | null;
  same: string | null;
  childrens: childrenFamily[];
}

interface Address {
  address: string | null;
  provinceId: string | null;
  districtId: string | null;
  subdistrictId: string | null;
  addressC: string | null;
  provinceIdC: string | null;
  districtIdC: string | null;
  subdistrictIdC: string | null;
  same: string | null;
}

interface Goverment {
  ocId: string | null;
  positionId: string | null;
  workId: string | null;
  typeId: string | null;
  levelId: string | null;
  numberId: string | null;
  businessId: string | null;
  containDate: Date;
  workDate: Date;
  retireDate: string | null;
  absent: number | null;
  age: number | null;
  ageAll: string | null;
  reasonSameDate: string | null;
}

interface DataOption {
  id: string | number;
  name: string;
  zipCode?: string;
}

interface zipCodeOption {
  id: string;
  name: string;
  zipCode: string;
}

const defaultGoverment: Goverment = {
  ocId: null,
  positionId: null,
  workId: null,
  typeId: null,
  levelId: null,
  numberId: null,
  businessId: null,
  containDate: new Date(),
  workDate: new Date(),
  retireDate: null,
  absent: 0,
  age: 0,
  ageAll: null,
  reasonSameDate: null,
};

const defaultAddress: Address = {
  address: null,
  provinceId: null,
  districtId: null,
  subdistrictId: null,
  addressC: null,
  provinceIdC: null,
  districtIdC: null,
  subdistrictIdC: null,
  same: "0",
};

const defaultInformation: Information = {
  idCard: null,
  prefix: null,
  prefixId: null,
  fullName: null,
  firstname: null,
  lastname: null,
  nationality: null,
  race: null,
  dateOfBirth: new Date(),
  age: null,
  telephone: null,
  gender: null,
  genderId: null,
  relationship: null,
  relationshipId: null,
  bloodGroup: null,
  bloodGroupId: null,
  religion: null,
  religionId: null,
};

const defaultFamily: Family = {
  prefixC: null,
  prefixIdC: null,
  firstnameC: null,
  lastnameC: null,
  lastnameCOld: null,
  occupationC: null,
  prefixM: null,
  prefixIdM: null,
  firstnameM: null,
  lastnameM: null,
  occupationM: null,
  prefixF: null,
  prefixIdF: null,
  firstnameF: null,
  lastnameF: null,
  occupationF: null,
  same: "0",
  childrens: [],
};

export { defaultInformation, defaultFamily, defaultAddress, defaultGoverment };
export type {
  ChangeActive,
  Information,
  Family,
  Address,
  Goverment,
  DataOption,
  zipCodeOption,
};
