import { ReactNode } from 'react';
import { ProviderProps } from './Provider';
import { Store, TemplateData } from './types';
type TemplatesControlInnerProps = {
    toggleContent?: ReactNode;
    disabled?: boolean;
    className?: string;
    testId?: string;
};
export type TemplatesControlProps<T extends TemplateData> = {
    /**
     * Id of the currently selected template
     */
    currentTemplateId?: ProviderProps<T>['currentTemplateId'];
    /**
     * Full data of the current template
     */
    templateSettings?: ProviderProps<T>['templateSettings'];
    /**
     * Aka "default templates", preset by app itself
     */
    presetTemplates?: ProviderProps<T>['presetTemplates'];
    foldersEnabled?: ProviderProps<T>['foldersEnabled'];
    /**
     * If `true` - will reload templates list when opening popover
     * @default true
     */
    reloadListOnOpen?: ProviderProps<T>['reloadListOnOpen'];
    publishEnabled?: ProviderProps<T>['publishEnabled'];
    templateIconColors?: ProviderProps<T>['templateIconColors'];
    /**
     * @default templateIconColors[0]
     */
    defaultTemplateIconColor?: ProviderProps<T>['defaultTemplateIconColor'];
    templateIconMap?: ProviderProps<T>['templateIconMap'];
    defaultTemplateIcon?: ProviderProps<T>['defaultTemplateIcon'];
    /**
     * Called when current template is changed
     *
     * ⚠️⚠️⚠️ This callback is called asynchronously, which may make several state setters produce several state updates,
     * leading to incorrect data fed into TemplatesControl when template data "lags behind" template id.
     * Generally, template id and template data should be processed together as an atomic object.
     */
    onChange?: ProviderProps<T>['onChange'];
    /**
     * Used to determine template id selected on initial load or when current template is deleted.
     *
     * Can be used to enforce "App always has a template" workflow
     */
    getDefaultTemplate?: ProviderProps<T>['getDefaultTemplate'];
    /**
     * Filters/replaces templates on initial load. Receives a list of templates already filtered according user's access rights
     */
    filterInitialTemplates?: Store<T>['hooks']['filterInitialTemplates'];
    /**
     * Additional controls to render in template menu. `TemplatesControlAdditionalControlProps` type is exported for convenience.
     */
    templateControls?: Store<T>['templateControls'];
    /**
     * Content to show inside of toggle
     */
    toggleContent?: ReactNode;
} & Omit<TemplatesControlInnerProps, 'toggleContent'>;
export declare const TemplatesControl: {
    <T extends TemplateData>({ testId, className, disabled, toggleContent, ...providerProps }: TemplatesControlProps<T>): JSX.Element;
    Provider: <T extends TemplateData>({ children, presetTemplates, onChange, foldersEnabled, templateIconColors, templateIconMap, defaultTemplateIcon, currentTemplateId, templateSettings, publishEnabled, getDefaultTemplate, defaultTemplateIconColor, filterInitialTemplates, templateControls, reloadListOnOpen, }: ProviderProps<T>) => JSX.Element;
    Toggle: import("react").ForwardRefExoticComponent<import("./Toggle").ToggleProps & import("react").RefAttributes<HTMLButtonElement>>;
    Popover: ({ anchorEl, placement, disabled }: import("./Popover").PopoverProps) => JSX.Element | null;
    ToggleDisplayDefault: ({ showNewTag }: import("./ToggleDisplayDefault").ToggleDisplayDefaultProps) => JSX.Element;
    GetHeaderElement: (target?: HTMLElement | null | undefined) => HTMLElement | undefined;
};
export {};
//# sourceMappingURL=TemplatesControl.d.ts.map