import type { ComponentType } from 'react';
import type { PluginToolbarIds, ToolbarButtonProps, ToolbarType } from './index.js';
import type { InsertPluginButtons } from './insert-plugin-buttons.js';
export interface PlatformSettings<T> {
    desktop?: T;
    mobile?: {
        ios?: T;
        android?: T;
    };
}
export interface TextButtonMapping {
    component?: ComponentType;
    isMobile?: boolean;
    position?: {
        mobile?: number;
        desktop?: number;
    };
    externalizedButtonProps?: ToolbarButtonProps;
}
export type ToolbarSettingsFunctions = ToolbarSettingsFunctionsGeneric | ToolbarSettingsFunctionsDesktop;
export interface ToolbarSettingsFunctionsGeneric {
    name: Exclude<ToolbarType, ToolbarSettingsFunctionsDesktop['name']>;
    shouldCreate?: () => PlatformSettings<boolean>;
    getButtons?: () => PlatformSettings<any[]>;
    getTextPluginButtons?: () => PlatformSettings<{
        [key: string]: ComponentType | TextButtonMapping;
    }>;
    onClick?: () => void;
}
type ToolbarSettingsFunctionsDesktop = {
    name: ToolbarType.QUICK_ACTIONS;
    shouldCreate?: () => PlatformSettings<boolean>;
    placeholder?: string;
    activateOnFloatingPlusButton?: boolean;
} | {
    name: ToolbarType.FOOTER;
    shouldCreate?: () => PlatformSettings<boolean>;
    footerToolbarConfig?: FooterToolbarConfig;
} | {
    name: ToolbarType.SIDE;
    shouldCreate?: () => PlatformSettings<boolean>;
    /**
     * Called when the user clicks the inline plus button. Receives
     * `defaultTrigger` — invoke it to fall back to the default open-menu
     * behaviour (opens the quick-actions modal).
     */
    onClick?: (defaultTrigger?: () => void) => void;
} | {
    name: ToolbarType.STATIC;
    shouldCreate?: () => PlatformSettings<boolean>;
    getButtons?: () => PlatformSettings<any[]>;
    getTextPluginButtons?: () => PlatformSettings<{
        [key: string]: ComponentType | TextButtonMapping;
    }>;
} | {
    name: ToolbarType.INLINE;
    shouldCreate?: () => PlatformSettings<boolean>;
    getButtons?: () => PlatformSettings<any[]>;
    getTextPluginButtons?: () => PlatformSettings<{
        [key: string]: ComponentType | TextButtonMapping;
    }>;
} | {
    name: ToolbarType.PLUGIN;
    shouldCreate?: () => PlatformSettings<boolean>;
    filterItems?: (item: any, nodeType: PluginToolbarIds) => boolean;
    /**
     * Full-list filter / reorder for the plugin toolbar. Receives all items
     * for the current plugin toolbar; return them in the desired order
     * (or a subset). Items returned are rendered in that order — unknown
     * ids are ignored. Takes precedence over `filterItems` when both are
     * provided. Used by the V2 `toolbars.plugin.buttons` adapter.
     * @internal
     */
    filterButtons?: (items: any[], nodeType: PluginToolbarIds) => any[];
} | {
    name: ToolbarType.LINK;
    shouldCreate?: () => PlatformSettings<boolean>;
} | {
    name: ToolbarType.INSERT_PLUGIN;
    shouldCreate?: () => PlatformSettings<boolean>;
    getButtons?: () => PlatformSettings<any[]>;
};
export interface FooterToolbarConfig {
    morePluginsMenu?: {
        splitToSections?: boolean;
        showSearch?: boolean;
    };
    pluginsToDisplayInToolbar?: InsertPluginButtons[keyof InsertPluginButtons][];
}
export type TextGroupButtons = {
    name: string;
    buttons: string[];
};
export type DesktopTextButtons = (string | TextGroupButtons)[];
export type TextButtons = {
    desktop: DesktopTextButtons;
    mobile: string[];
};
export type PluginButton = {
    buttonSettings: ToolbarButtonProps;
    component: ComponentType;
    blockType: string;
};
export type GetToolbarSettings = ({ textButtons, pluginButtons, pluginButtonNames, pluginButtonProps }: {
    textButtons?: TextButtons;
    pluginButtons?: any[];
    pluginButtonNames?: string[];
    pluginButtonProps?: any[];
}) => ToolbarSettingsFunctions[];
export {};
//# sourceMappingURL=toolbar-settings-types.d.ts.map