import React from 'react';
import type { BaseTableRefType } from '@/common/base-table';
import { ActionType, MenuAccess } from './TableActionMenu';
/** 菜单处理函数 */
declare type ActionTypeHandlers<T> = Record<ActionType, (params: T) => Promise<void> | void>;
/** 弹窗菜单依赖 */
declare type UseTableMenuActionDeps = {
    /** 工作空间 id */
    workspaceId: string;
    /** 刷新视图方法 */
    mutate: () => void;
    baseTableRef: React.MutableRefObject<BaseTableRefType>;
};
declare type pageProps = 'detail' | 'drawer';
/** 获取 Table menu actions 事件处理函数 */
export declare const useTableActionMenuHandlers: <Params extends {
    itemId: string;
    extra: any;
    page?: pageProps;
}>(handlersReplacement: Partial<ActionTypeHandlers<Params>>, deps: UseTableMenuActionDeps) => ActionTypeHandlers<Params>;
/** 弹窗渲染依赖函数 */
declare type UseTableActionMenuConfig<T = unknown, ReturnVal = {
    access?: MenuAccess;
    extraData?: any;
}> = {
    /** 获取菜单渲染依赖数据，推迟到弹窗触发按钮点击时执行，异步 */
    defferGenerateMenuDeps?: (props: T) => Promise<ReturnVal>;
    /** 同步获取菜单渲染依赖数据，优先级高  */
    generateMenuDeps?: (props: T) => ReturnVal;
    /** 排除的菜单 */
    excludeMenuKeys?: string[];
};
/** 获取操作菜单 */
export declare const useTableActionMenuRenderer: <Props extends {
    itemId: string;
}>(config: UseTableActionMenuConfig<Props, {
    access?: MenuAccess;
    extraData?: any;
}>, actionHandlers: ActionTypeHandlers<unknown>) => {
    renderTableAction: (props: Props) => React.ReactElement;
};
export {};
