export type OnlineFormTemplateInput = {
  label: string;
  dataType: string;
  required: boolean;
  multiple: boolean;
  options?: string[];
};

const formTemplates: Record<string, OnlineFormTemplateInput[]> = {
  "Application for Bicycle Parking": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Bicycle Description", dataType: "Text Input", required: true, multiple: false },
    { label: "Bicycle Serial No.", dataType: "Text Input", required: false, multiple: false },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Application for Booking of BBQ Pit": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Date of Booking", dataType: "Date Input", required: true, multiple: false },
    { label: "Time From", dataType: "Text Input", required: true, multiple: false },
    { label: "Time To", dataType: "Text Input", required: true, multiple: false },
    { label: "No. of Pax", dataType: "Text Input", required: true, multiple: false },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
  "Application for Booking of Rooftop Bar/Dining": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Date of Booking", dataType: "Date Input", required: true, multiple: false },
    { label: "Time From", dataType: "Text Input", required: true, multiple: false },
    { label: "Time To", dataType: "Text Input", required: true, multiple: false },
    { label: "No. of Pax", dataType: "Text Input", required: true, multiple: false },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
  "Application for Electronic Access Card": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "No. of Cards Required", dataType: "Text Input", required: true, multiple: false },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Application for Main Entrance RFID Transponder": [
    { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle Make/Model", dataType: "Text Input", required: true, multiple: false },
    { label: "No. of Transponders", dataType: "Text Input", required: true, multiple: false },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Application for Moving In/Out & Delivery": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Type", dataType: "Select", required: true, multiple: false, options: ["Moving In", "Moving Out", "Delivery"] },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
    { label: "Time From", dataType: "Text Input", required: true, multiple: false },
    { label: "Time To", dataType: "Text Input", required: true, multiple: false },
    { label: "Moving Company", dataType: "Text Input", required: false, multiple: false },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
  "Application for Renovation/Addition & Alteration Works": [
    { label: "Owner/Tenant Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Description of Works", dataType: "Text Area", required: true, multiple: false },
    { label: "Contractor Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Contractor Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Commencement Date", dataType: "Date Input", required: true, multiple: false },
    { label: "Completion Date", dataType: "Date Input", required: true, multiple: false },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
  "Letter of Undertaking & Indemnity": [
    { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Purpose of Undertaking", dataType: "Text Area", required: true, multiple: false },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Letter of Undertaking by Marketing Agent": [
    { label: "Marketing Agent Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Agency Name", dataType: "Text Input", required: true, multiple: false },
    { label: "CEA Registration No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Pet's Record Form": [
    { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Pet Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Pet Type", dataType: "Select", required: true, multiple: false, options: ["Dog", "Cat", "Rabbit", "Bird", "Fish", "Others"] },
    { label: "Breed", dataType: "Text Input", required: true, multiple: false },
    { label: "Colour", dataType: "Text Input", required: true, multiple: false },
    { label: "Age", dataType: "Text Input", required: true, multiple: false },
    { label: "Sex", dataType: "Select", required: true, multiple: false, options: ["Male", "Female"] },
    { label: "Microchip No.", dataType: "Text Input", required: false, multiple: false },
    { label: "License No.", dataType: "Text Input", required: false, multiple: false },
  ],
  "Refund of Deposit": [
    { label: "Owner/Tenant Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Bank Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Account No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Account Holder Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Deposit Type", dataType: "Select", required: true, multiple: false, options: ["Renovation Deposit", "Access Card Deposit", "Moving Deposit", "Others"] },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
  "Update of Mailing Address": [
    { label: "Name", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "New Mailing Address", dataType: "Text Area", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Effective Date", dataType: "Date Input", required: true, multiple: false },
  ],
  "Vehicle Registration Form": [
    { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
    { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
    { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle No.", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle Make", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle Model", dataType: "Text Input", required: true, multiple: false },
    { label: "Vehicle Colour", dataType: "Text Input", required: true, multiple: false },
    { label: "IU Number", dataType: "Text Input", required: false, multiple: false },
    { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
  ],
};

const templateNames = Object.keys(formTemplates);

export default function useOnlineFormTemplates() {
  return { formTemplates, templateNames };
}
