import { UseQueryOptions } from '@tanstack/react-query';
/**
 * Hook for getting user permissions
 *
 * Calls the authProvider.getPermissions() method using react-query.
 * If the authProvider returns a rejected promise, returns empty permissions.
 *
 * The return value updates according to the request state:
 *
 * - start: { isLoading: true }
 * - success: { permissions: [any], isLoading: false }
 * - error: { error: [error from provider], isLoading: false }
 *
 * Useful to enable features based on user permissions
 *
 * @param {Object} params Any params you want to pass to the authProvider
 *
 * @returns The current auth check state. Destructure as { permissions, error, isLoading }.
 *
 * @example
 *     import { usePermissions } from '@alkuip/core';
 *
 *     const PostDetail = props => {
 *         const { isLoading, permissions } = usePermissions();
 *         if (!isLoading && permissions == 'editor') {
 *             return <PostEdit {...props} />
 *         } else {
 *             return <PostShow {...props} />
 *         }
 *     };
 */
export declare const usePermissions: <Permissions_1 = any, Error_1 = any>(params?: any, queryParams?: UseQueryOptions<Permissions_1, Error_1, Permissions_1, import("@tanstack/react-query").QueryKey>) => {
    permissions: Permissions_1 | undefined;
    isLoading: boolean;
    error: Error_1 | null;
};
export default usePermissions;
