declare type TVisitor = {
  _id?: string;
  name?: string;
  type: TVisitorType;
  company?: string | "";
  block?: number | string;
  level?: string;
  unit?: string;
  unitName?: string; // only for display purpose
  contact: string;
  plateNumber: string;
  checkIn?: string;
  checkOut?: string | null;
  contractorType?: string;
  deliveryType?: string;
  nric?: string;
  contact?: string;
  remarks?: string;
  purpose?: string;
  attachments: string[];
  org: string;
  site: string;
  manualCheckout?: boolean;
  visitorPass?: TPassKeyPayload[];
  passKeys?: TPassKeyPayload[];
  checkInRemarks?: string;
  checkOutRemarks?: string;
};

declare type TVisitorType =
  | "contractor"
  | "delivery"
  | "walk-in"
  | "pick-up"
  | "drop-off"
  | "guest";

declare type TVisitorPayload = Pick<
  TVisitor,
  | "name"
  | "type"
  | "company"
  | "block"
  | "level"
  | "unit"
  | "unitName"
  | "contact"
  | "plateNumber"
  | "checkOut"
  | "contractorType"
  | "deliveryType"
  | "nric"
  | "contact"
  | "remarks"
  | "attachments"
  | "org"
  | "site"
  | "status"
  | "visitorPass"
  | "passKeys"
  | "checkInRemarks"
  | "checkOutRemarks"
> & {
  members?: TMemberInfo[];
};

declare type TDefaultOptionObj = {
  title: string;
  value: any;
};

declare type TMemberInfo = {
  name: string;
  nric: string;
  visitorPass?: { keyId: string }[];
  passKeys?: TPassKeyPayload[];
  contact: string
}

declare type TPassKeyPayload = {
  keyId: string;
  status?: string;
  remarks?: string;
};
