//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 {
  cardid: string | null;
  prefix: string | null;
  age: string | null;
  prefixId: string | null;
  firstname: string | null;
  lastname: string | null;
  birthDate: Date | null;
  genderId: string | null;
  bloodId: string | null;
  nationality: string | null;
  ethnicity: string | null;
  statusId: string | null;
  religionId: string | null;
  tel: string | null;
  employeeType: string | null;
  employeeClass: string | null;
  profileType: string | null;
}

interface Family {
  prefixC: string | null; // couple
  prefixIdC: string | null;
  firstnameC: string | null;
  lastnameC: string | null;
  lastnameCOld: string | null;
  occupationC: string | null;
  citizenIdC: string | null;
  liveC: string | null;
  prefixM: string | null; // male
  prefixIdM: string | null;
  firstnameM: string | null;
  lastnameM: string | null;
  occupationM: string | null;
  citizenIdM: string | null;
  liveM: string | null;
  prefixF: string | null; // female
  prefixIdF: string | null;
  firstnameF: string | null;
  lastnameF: string | null;
  occupationF: string | null;
  citizenIdF: string | null;
  liveF: 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;
  positionPathSide: string | null;
  positionLine: string | null;
  positionType: string | null;
  positionLevel: string | null;
  numberId: string | null;
  positionExecutive: string | null;
  positionExecutiveSide: 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;
  name: string;
  zipCode?: string;
}

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

const defaultGoverment: Goverment = {
  ocId: null,
  positionId: null,
  positionPathSide: null,
  positionLine: null,
  positionType: null,
  positionLevel: null,
  numberId: null,
  positionExecutive: null,
  positionExecutiveSide: 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 = {
  cardid: null,
  age: null,
  prefix: null,
  prefixId: null,
  firstname: null,
  lastname: null,
  birthDate: null,
  genderId: null,
  bloodId: null,
  nationality: null,
  ethnicity: null,
  statusId: null,
  religionId: null,
  tel: null,
  employeeType: null,
  employeeClass: null,
  profileType: null,
};

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

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