/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import React from 'react';
import { type FC } from 'react';
export type ACLRoleData = {
    snippets?: string[];
    role?: string;
    roleMode?: string;
    resources?: string[];
    actions?: Record<string, any>;
    actionAlias?: Record<string, string>;
    strategy?: {
        actions?: string[];
    };
    allowAll?: boolean;
    allowConfigure?: boolean;
    availableActions?: string[];
    allowMenuItemIds?: number[];
    allowAnonymous?: boolean;
    uiButtonSchemasBlacklist?: string[];
};
export type ACLMeta = Record<string, any>;
type ACLContextValue = {
    loading: boolean;
    data: {
        data: ACLRoleData;
        meta: ACLMeta;
    };
    refresh: () => Promise<void>;
};
export declare const ACLContext: React.Context<ACLContextValue>;
/**
 * 在 v2 中执行 `roles:check`，并把 ACL 数据同步到 app context。
 */
export declare const ACLRolesCheckProvider: FC;
/**
 * 返回原始 ACL provider 上下文。
 */
export declare const useACLContext: () => ACLContextValue;
/**
 * 触发当前角色权限重新检查。
 */
export declare const useRoleRecheck: () => () => Promise<void>;
/**
 * 返回当前角色模式。
 */
export declare const useCurrentRoleMode: () => string;
/**
 * 返回当前角色可直接消费的 ACL 数据与动作解析函数。
 */
export declare function useACLRoleContext(): {
    snippets: string[];
    parseAction: (actionPath: string) => any;
    role?: string;
    roleMode?: string;
    resources?: string[];
    actions?: Record<string, any>;
    actionAlias?: Record<string, string>;
    strategy?: {
        actions?: string[];
    };
    allowAll?: boolean;
    allowConfigure?: boolean;
    availableActions?: string[];
    allowMenuItemIds?: number[];
    allowAnonymous?: boolean;
    uiButtonSchemasBlacklist?: string[];
};
/**
 * 返回当前用户是否允许配置界面。
 */
export declare function useUIConfigurationPermissions(): {
    allowConfigUI: boolean;
};
export {};
