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

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

    return {
        canCreateProduct: can(PERMISSIONS.paymentProductCreate),
        canDeleteProduct: can(PERMISSIONS.paymentProductDelete),
        canUpdateProduct: can(PERMISSIONS.paymentProductUpdate),
        canViewBill: can(PERMISSIONS.paymentBillView),
        canViewProduct: can(PERMISSIONS.paymentProductView),
        canViewTemporaryLink: can(PERMISSIONS.paymentTemporaryLinkView),
        canUpdateThirdParty: can(PERMISSIONS.paymentThirdPartyUpdate),
        canViewThirdParty: can(PERMISSIONS.paymentThirdPartyView),
    };
}
