import type { HighlightLanguage } from '../HighlightExtended.js'; /** * Props for the `CodeSnippet.Download` slot. * @public */ export interface CodeSnippetDownloadProps { /** * Name of the downloaded file. If no extension is provided, it is derived * from the `language` prop. Both the filename and extension are sanitized to keep * only letters, digits, `-`, and `_`. * @defaultValue 'code-snippet.\' */ fileName?: string; /** * Callback fired when the download action is triggered. */ onDownload?: () => void; } /** * Slot that enables a Download action inside `CodeSnippet.ActionsMenu`. * @public */ export declare const Download: (props: CodeSnippetDownloadProps) => null; /** * Hands the snippet to the browser as a text file download and notifies the consumer. * @param snippetContent - The snippet's plain-text content. * @param downloadConfig - Configuration of the Download action. * @param language - The snippet's highlight language, used to derive the file extension. */ export declare function downloadSnippet(snippetContent: string, { fileName, onDownload }: CodeSnippetDownloadProps, language?: HighlightLanguage): void; /** * Props for the `DownloadInternal` component. */ interface DownloadInternalProps { /** * Layout size of the snippet, matched by the button. */ size: 'default' | 'condensed'; /** * Callback fired when the button is activated. */ onSelect: () => void; } /** * Renders `CodeSnippet.Download` as a standalone button. * @internal */ export declare const DownloadInternal: ({ size, onSelect }: DownloadInternalProps) => import("react").JSX.Element; export {}; //# sourceMappingURL=Download.d.ts.map