import { type ReactNode } from 'react'; /** * Configuration of the built-in Download item of an editor's actions menu. * @internal */ export interface EditorDownloadConfig { /** * Label of the Download item. */ label: string; /** * Consumer-provided name of the downloaded file. */ fileName?: string; /** * Callback fired when the download action is triggered. */ onDownload?: () => void; /** * File name used when `fileName` yields no usable name. */ defaultFileNameStem: string; /** * Extension (including the leading dot) used when `fileName` carries none. */ defaultExtension: string; } /** * Configuration of the actions menu rendered by the `BaseCodeEditor`. * Each editor supplies its own labels and built-in items. * @internal */ export interface EditorActionsMenuConfig { /** * Accessible label of the menu trigger button. */ triggerLabel: string; /** * Label of the built-in Copy item. */ copyLabel: string; /** * Behavior tracking name of the built-in Copy item. */ copyDataDtChildrenName: string; /** * When provided, a Download item is rendered directly after Copy. */ download?: EditorDownloadConfig; /** * Editor-specific built-in items, rendered after Copy and Download. */ builtInItems?: ReactNode; /** * Consumer-provided items, rendered after the built-in items. */ customItems?: ReactNode; /** * Items rendered in their own group at the end of the menu. */ trailingItems?: ReactNode; } /** * Props for the `EditorActionsMenu` component. * @internal */ export interface EditorActionsMenuProps { /** * What the menu contains, as supplied by the editor. */ config: EditorActionsMenuConfig; /** * The editor's size variant affecting the trigger button and positioning. */ size: 'default' | 'condensed'; /** * The id of the editor's root element. The menu content is portaled out of * it, so it references this id for behavior tracking. */ editorRootId: string; /** * Returns the editor's current content. Needs a stable identity. */ getValue: () => string; } /** * Renders the actions menu of the `BaseCodeEditor`: a single Copy button when * Copy is the only action, otherwise a menu. * @internal */ export declare const EditorActionsMenu: ({ config: { triggerLabel, copyLabel, copyDataDtChildrenName, download, builtInItems, customItems, trailingItems, }, size, editorRootId, getValue, }: EditorActionsMenuProps) => import("react").JSX.Element; //# sourceMappingURL=EditorActionsMenu.d.ts.map