import type { TestkitShape, UniDriver } from '../../../ricos-types/testkit';
import type { AllPluginsTestkits } from '../../../_shared/get-all-plugin-testkits';
import type { ToolbarCreationFunctionKeys } from './toolbar-testkit-types.js';
type GetBaseFunction<T> = T extends (getBase: infer G) => any ? G : never;
type TestkitGetBaseParams<ToolName extends keyof NonNullable<TestkitShape['toolbars']>> = GetBaseFunction<NonNullable<TestkitShape['toolbars']>[ToolName]> extends (...args: infer P) => any ? P : never;
export type ExtractedToolbarsTeskits<Field extends ToolbarCreationFunctionKeys> = {
    [key in keyof AllPluginsTestkits as AllPluginsTestkits[key] extends {
        toolbars: {
            [fieldKey in Field]: any;
        };
    } ? key : never]: AllPluginsTestkits[key] extends {
        toolbars: {
            [fieldKey in Field]: any;
        };
    } ? ReturnType<AllPluginsTestkits[key]['toolbars'][Field]> : never;
};
export type TestkitCreatorByType<Field extends ToolbarCreationFunctionKeys> = ReturnType<typeof getTestkitsFromPlugins<Field>>;
export declare const getTestkitsFromPlugins: <Field extends ToolbarCreationFunctionKeys, A = ExtractedToolbarsTeskits<Field>>(pluginToolbarsMap: AllPluginsTestkits, toolbarsField: Field) => ((getBase: (...params: TestkitGetBaseParams<Field>) => UniDriver<Element>) => A);
export {};
//# sourceMappingURL=get-testkits-from-plugins.d.ts.map