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

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

    return {
        canPassword: can(PERMISSIONS.appUserPassword),
        canPrettyGenerate: can(PERMISSIONS.prettyIdGenerate),
        canPrettyGrant: can(PERMISSIONS.prettyIdGrant),
        canPrettyUpdate: can(PERMISSIONS.prettyIdUpdate),
        canPrettyView: can(PERMISSIONS.prettyIdView),
        canCoinLedger: can(PERMISSIONS.coinLedgerView),
        canStatus: can(PERMISSIONS.appUserStatus),
        canUpdate: can(PERMISSIONS.appUserUpdate),
        canUpload: can(PERMISSIONS.uploadCreate),
        canView: can(PERMISSIONS.appUserView),
        canLevel: can(PERMISSIONS.appUserLevel),
        canExport: can(PERMISSIONS.appUserExport),
    };
}
