import { ReactNode } from 'react';
import { ObjectsActionParams, ObjectsActionSpec } from './ObjectsActionSpec';
export type ObjectsActionCallback = (params: ObjectsActionParams) => Promise<unknown>;
export declare class ObjectsActionContext {
    params: Omit<ObjectsActionParams, 'action'>;
    allActions: ObjectsActionSpec[];
    wfRules: ObjectsActionSpec[];
    callbacks: Record<string, ObjectsActionCallback>;
    startWorkflow?: ObjectsActionCallback;
    constructor(params: Omit<ObjectsActionParams, 'action'>);
    get actions(): ObjectsActionSpec[];
    loadWorkflows(): Promise<ObjectsActionSpec[]>;
    registerCallback(name: string, cb: (params: ObjectsActionParams) => Promise<unknown>): () => void;
    unregisterCallback(name: string): void;
    findAction(actionId: string): ObjectsActionSpec | undefined;
    run(actionId: string): Promise<unknown>;
}
interface ObjectsActionContextProps {
    children: ReactNode;
}
export declare function ObjectsActionContextProvider({ children }: ObjectsActionContextProps): import("react/jsx-runtime").JSX.Element;
export declare function useObjectsActionContext(): ObjectsActionContext;
export declare function useObjectsActionCallback(name: string, cb: ObjectsActionCallback): ObjectsActionContext;
export declare function useStartWorkflowCallback(cb: ObjectsActionCallback): ObjectsActionContext;
export {};
//# sourceMappingURL=ObjectsActionContext.d.ts.map