export function useCommonPermissions() {
  const invitationPermissions: Record<string, TPermission> = {
    "create-invitation": {
      check: true,
      description:
        "Allows the user to create a new invitation for a invitation to join the organization.",
    },
    "view-invitations": {
      check: true,
      description:
        "Allows the user to view the list of all invitation in the organization.",
    },
    "cancel-invitation": {
      check: true,
      description:
        "Allows the user to permanently remove a invitation from the organization.",
    },
  };

  const memberPermissions: Record<string, TPermission> = {
    "view-members": {
      check: true,
      description:
        "Allows the user to view the list of all members in the organization.",
    },
    "assign-member-role": {
      check: true,
      description:
        "Allows the user to assign a specific role to a member in the organization.",
    },
    "suspend-member": {
      check: true,
      description: "Allows the user to suspend a member's account temporarily.",
    },
    "activate-member": {
      check: true,
      description:
        "Allows the user to reactivate a suspended member's account.",
    },
    "delete-member": {
      check: true,
      description:
        "Allows the user to permanently remove a member from the organization.",
    },
  };

  const rolePermissions: Record<string, TPermission> = {
    "add-role": {
      check: true,
      description: "Allows the user to add a new role to the system.",
    },
    "see-all-roles": {
      check: true,
      description: "Allows the user to view the list of all roles.",
    },
    "see-role-details": {
      check: true,
      description: "Allows the user to view the details of a specific role.",
    },
    "delete-role": {
      check: true,
      description:
        "Allows the user to remove a role from the system permanently.",
    },
    "update-role": {
      check: true,
      description: "Allows the user to update the details of an existing role.",
    },
  };

  const feedbackPermissions: Record<string, TPermission> = {
    "add-feedback": {
      check: true,
      description: "Allows the user to create a new feedback.",
    },
    "see-all-feedback": {
      check: true,
      description: "Allows the user to view the list of all feedback.",
    },
    "see-feedback-details": {
      check: true,
      description:
        "Allows the user to view the details of a specific feedback.",
    },
    "delete-feedback": {
      check: true,
      description:
        "Allows the user to remove a feedback from the system permanently.",
    },
    "update-feedback": {
      check: true,
      description:
        "Allows the user to update the details of an existing feedback.",
    },
  };

  const workOrderPermissions: Record<string, TPermission> = {
    "create-work-order": {
      check: true,
      description: "Allows the user to create a new work order.",
    },
    "see-all-work-orders": {
      check: true,
      description: "Allows the user to view the list of all work orders.",
    },
    "see-work-order-details": {
      check: true,
      description:
        "Allows the user to view the details of a specific work order.",
    },
    "delete-work-order": {
      check: true,
      description:
        "Allows the user to remove a work order from the system permanently.",
    },
    "update-work-order": {
      check: true,
      description:
        "Allows the user to update the details of an existing work order.",
    },
  };

  const visitorManagementPermissions: Record<string, TPermission> = {
    "add-visitor": {
      check: true,
      description: "Allows the user to add a new visitor to the system.",
    },
    "see-all-visitor": {
      check: true,
      description: "Allows the user to view the list of all visitors.",
    },
    "see-visitor-details": {
      check: true,
      description: "Allows the user to view the details of a specific visitor.",
    },
    "update-visitor": {
      check: true,
      description: "Allows the user to update visitor details.",
    },
    "delete-visitor": {
      check: true,
      description:
        "Allows the user to remove a visitor from the system permanently.",
    },
  };

  const buildingManagementPermissions: Record<string, TPermission> = {
    "add-building": {
      check: true,
      description: "Allows the user to add a new building to the system.",
    },
    "see-all-buildings": {
      check: true,
      description: "Allows the user to view the list of all buildings.",
    },
    "see-building-details": {
      check: true,
      description:
        "Allows the user to view the details of a specific building.",
    },
    "update-building": {
      check: true,
      description: "Allows the user to update building details.",
    },
    "delete-building": {
      check: true,
      description:
        "Allows the user to remove a building from the system permanently.",
    },
  };

  const buildingUnitManagementPermissions: Record<string, TPermission> = {
    "add-building-unit": {
      check: true,
      description: "Allows the user to add a new building unit to the system.",
    },
    "see-all-building-units": {
      check: true,
      description: "Allows the user to view the list of all building units.",
    },
    "see-building-unit-details": {
      check: true,
      description:
        "Allows the user to view the details of a specific building unit.",
    },
    "update-building-unit": {
      check: true,
      description: "Allows the user to update building unit details.",
    },
    "delete-building-unit": {
      check: true,
      description:
        "Allows the user to remove a building unit from the system permanently.",
    },
    
  };


    const bulletinBoardPermissions: Record<string, TPermission> = {
      "add-bulletin-board": {
        check: true,
        description: "Allows the user to add a new bulletin board to the system.",
      },
      "see-all-bulletin-boards": {
        check: true,
        description: "Allows the user to view the list of all bulletin boards.",
      },
      "see-bulletin-board-details": {
        check: true,
        description:
          "Allows the user to view the details of a specific bulletin board.",
      },
      "update-bulletin-board": {
        check: true,
        description: "Allows the user to update bulletin board details.",
      },
      "delete-bulletin-board": {
        check: true,
        description:
          "Allows the user to remove a bulletin board from the system permanently.",
      },
    }

  return {
    invitationPermissions,
    memberPermissions,
    rolePermissions,
    feedbackPermissions,
    workOrderPermissions,
    visitorManagementPermissions,
    buildingManagementPermissions,
    buildingUnitManagementPermissions,
    bulletinBoardPermissions,
  };
}
