export default function useCleaningPermission() {
  const {
    rolePermissions,
    memberPermissions,
    feedbackPermissions,
    workOrderPermissions,
    invitationPermissions,
    bulletinBoardPermissions,
  } = useCommonPermissions();
  const permissions: TPermissions = {
    members: memberPermissions,
    feedbacks: feedbackPermissions,
    work_order: workOrderPermissions,
    roles: rolePermissions,
    invitations: invitationPermissions,
    "bulletin-board": bulletinBoardPermissions,
    inventory: {
      "view-inventory": {
        check: true,
        description: "Allows the user to view the inventory list.",
      },
    },
    // area management permissions
    "area-mgmt": {
      "see-all-areas": {
        check: true,
        description:
          "Allows the user to view the list of all areas for a site.",
      },
      "add-area": {
        check: true,
        description: "Allows the user to create/add an area to a site.",
      },
      "update-area": {
        check: true,
        description: "Allows the user to update/edit area details.",
      },
      "import-areas": {
        check: true,
        description: "Allows the user to import/upload areas via CSV/XLSX.",
      },
      "see-area-details": {
        check: true,
        description:
          "Allows the user to view detailed information for an area.",
      },
      "delete-area": {
        check: true,
        description: "Allows the user to delete/remove an area.",
      },
    },
    // unit management permissions
    "unit-mgmt": {
      "see-all-units": {
        check: true,
        description:
          "Allows the user to view the list of all units for a site.",
      },
      "add-unit": {
        check: true,
        description: "Allows the user to create/add a unit to a site.",
      },
      "update-unit": {
        check: true,
        description: "Allows the user to update/edit unit details.",
      },
      "import-units": {
        check: true,
        description: "Allows the user to import/upload units via CSV/XLSX.",
      },
      "see-unit-details": {
        check: true,
        description: "Allows the user to view detailed information for a unit.",
      },
      "delete-unit": {
        check: true,
        description: "Allows the user to delete/remove a unit.",
      },
    },
    // cleaning schedule management permissions
    "cleaning-schedule-mgmt": {
      "see-all-schedules": {
        check: true,
        description:
          "Allows the user to view the list of all cleaning schedules.",
      },
      "see-schedule-details": {
        check: true,
        description:
          "Allows the user to view detailed information for a cleaning schedule.",
      },
      "download-schedule": {
        check: true,
        description: "Allows the user to download cleaning schedule data.",
      },
      "manage-schedule-tasks": {
        check: true,
        description:
          "Allows the user to manage and update cleaning schedule tasks.",
      },
      "generate-checklist": {
        check: true,
        description: "Allows the user to generate new cleaning checklists.",
      },
      "view-history": {
        check: true,
        description: "Allows the user to view cleaning schedule history.",
      },
      "add-remarks": {
        check: true,
        description: "Allows the user to add remarks to cleaning tasks.",
      },
    },
    // schedule task management permissions
    "schedule-task-mgmt": {
      "see-all-schedule-tasks": {
        check: true,
        description: "Allows the user to view the list of all schedule tasks.",
      },
      "add-schedule-task": {
        check: true,
        description: "Allows the user to create/add a new schedule task.",
      },
      "update-schedule-task": {
        check: true,
        description: "Allows the user to update/edit schedule task details.",
      },
      "delete-schedule-task": {
        check: true,
        description: "Allows the user to delete/remove a schedule task.",
      },
      "see-schedule-task-details": {
        check: true,
        description:
          "Allows the user to view detailed information for a schedule task.",
      },
    },
    // attendance management permissions
    "attendance-mgmt": {
      "see-all-attendance": {
        check: true,
        description:
          "Allows the user to view all team members' attendance records.",
      },
      "see-attendance-details": {
        check: true,
        description:
          "Allows the user to view detailed information for an attendance record.",
      },
      "manage-attendance-settings": {
        check: true,
        description:
          "Allows the user to configure and manage attendance settings.",
      },
    },
    // my attendance permissions
    "my-attendance": {
      "see-own-attendance": {
        check: true,
        description: "Allows the user to view their own attendance records.",
      },
      "check-in-out": {
        check: true,
        description: "Allows the user to check in and check out.",
      },
    },
    // equipment management permissions
    "supply-mgmt": {
      "see-all-supplies": {
        check: true,
        description: "Allows the user to view the list of all equipments.",
      },
      "add-supply": {
        check: true,
        description: "Allows the user to create/add a new equipment item.",
      },
      "update-supply": {
        check: true,
        description: "Allows the user to update/edit equipment details.",
      },
      "delete-supply": {
        check: true,
        description: "Allows the user to delete/remove an equipment item.",
      },
      "add-stock": {
        check: true,
        description: "Allows the user to add stock to equipment items.",
      },
      "view-stock": {
        check: true,
        description: "Allows the user to view stock history and details.",
      },
      "checkout-item": {
        check: true,
        description: "Allows the user to checkout equipment items.",
      },
    },
    // checkout item management permissions
    "checkout-item-mgmt": {
      "see-all-checkouts": {
        check: true,
        description: "Allows the user to view all item checkouts.",
      },
      "create-checkout": {
        check: true,
        description: "Allows the user to create new item checkouts.",
      },
      "update-checkout": {
        check: true,
        description: "Allows the user to update/edit item checkouts.",
      },
      "approve-checkout": {
        check: true,
        description: "Allows the user to approve item checkouts.",
      },
      "disapprove-checkout": {
        check: true,
        description: "Allows the user to disapprove item checkouts.",
      },
      "view-checkout-details": {
        check: true,
        description:
          "Allows the user to view detailed information for item checkouts.",
      },
    },
  };

  return {
    permissions,
  };
}
