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

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

    return {
        canCreateInstance: can(PERMISSIONS.policyInstanceCreate),
        canPublishInstance: can(PERMISSIONS.policyInstancePublish),
        canSaveTemplate: can(PERMISSIONS.policyTemplateCreate),
        canUpdateInstance: can(PERMISSIONS.policyInstanceUpdate),
        canView: can(PERMISSIONS.policyTemplateView),
    };
}
