import { useAuth } from "@/app/auth/AuthProvider.jsx";
import { PERMISSIONS } from "@/app/permissions";

export function useHostAgencyPolicyAbilities() {
    const { can } = useAuth();

    return {
        canCreate: can(PERMISSIONS.hostAgencyPolicyCreate),
        canDelete: can(PERMISSIONS.hostAgencyPolicyDelete),
        canPublish: can(PERMISSIONS.hostAgencyPolicyPublish),
        canTeamCreate: can(PERMISSIONS.teamSalaryPolicyCreate),
        canTeamDelete: can(PERMISSIONS.teamSalaryPolicyDelete),
        canTeamUpdate: can(PERMISSIONS.teamSalaryPolicyUpdate),
        canTeamView: can(PERMISSIONS.teamSalaryPolicyView),
        canSettleSalary: can(PERMISSIONS.hostSalarySettlementSettle),
        canViewSettlements: can(PERMISSIONS.hostSalarySettlementView),
        canUpdate: can(PERMISSIONS.hostAgencyPolicyUpdate),
        canView: can(PERMISSIONS.hostAgencyPolicyView),
    };
}
