/**
 * @file RichTextEditorToolbar.tsx
 * @input Uses React, @lexical/react (composer context), @lexical/rich-text,
 *   @lexical/selection, @lexical/list, @lexical/utils, and the lexical core
 *   command constants, plus Astryx Toolbar / ToggleButton / Divider primitives.
 * @output Exports RichTextEditorToolbar (a composable formatting toolbar) and
 *   RichTextEditorToolbarProps.
 * @position Experimental (lab). Drop into RichTextEditor's `plugins` slot to add
 *   a formatting toolbar. Themed via Astryx Toolbar/ToggleButton, so it inherits
 *   the active theme with no extra styling.
 *
 * SYNC: When modified, update:
 * - /packages/lab/src/RichTextEditor/index.ts (exports)
 * - /packages/lab/src/index.ts (barrel re-export)
 * - /packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs (usage notes)
 * - /packages/lab/src/RichTextEditor/RichTextEditor.test.tsx (tests)
 * - /apps/storybook/stories/RichTextEditor.stories.tsx (WithToolbar story)
 *
 * NOTE: Experimental `@astryxdesign/lab` component (canary). `lexical` and
 * `@lexical/*` are OPTIONAL peer dependencies — install them to use this.
 * Behavior mirrors the Lexical playground toolbar (selection sync + format
 * commands); the UI is built from Astryx primitives so it matches the theme.
 *
 * ICONS: Each control resolves its glyph through the core icon registry under a
 * stable `richtext:*` key (see {@link RICHTEXT_ICON_KEYS}), falling back to the
 * bundled inline SVGs below. A theme can restyle any glyph by registering its
 * own icon for that key — no need to fork the toolbar:
 *   import {registerIcons} from '@astryxdesign/core/Icon';
 *   registerIcons({'richtext:bold': <MyBoldIcon />});
 */
import { type ReactNode } from 'react';
/**
 * Stable icon-registry keys for the toolbar's controls. Themes can override any
 * of these via `registerIcons({'richtext:bold': <MyIcon />})` from
 * `@astryxdesign/core/Icon`. Keys are namespaced (`richtext:*`) to avoid
 * collisions with the core semantic icon set.
 */
export declare const RICHTEXT_ICON_KEYS: {
    readonly bold: "richtext:bold";
    readonly italic: "richtext:italic";
    readonly underline: "richtext:underline";
    readonly strikethrough: "richtext:strikethrough";
    readonly code: "richtext:code";
    readonly link: "richtext:link";
    readonly h1: "richtext:h1";
    readonly h2: "richtext:h2";
    readonly h3: "richtext:h3";
    readonly quote: "richtext:quote";
    readonly bullet: "richtext:bullet";
    readonly number: "richtext:number";
    readonly undo: "richtext:undo";
    readonly redo: "richtext:redo";
};
export interface RichTextEditorToolbarProps {
    /**
     * Accessible label for the toolbar element.
     * @default 'Text formatting'
     */
    label?: string;
    /**
     * Which heading levels to expose as block-type buttons, in order.
     * @default ['h1', 'h2', 'h3']
     */
    headingLevels?: ReadonlyArray<'h1' | 'h2' | 'h3'>;
    /** Toolbar size, forwarded to the Astryx Toolbar. @default 'sm' */
    size?: 'sm' | 'md' | 'lg';
    /**
     * Whether to show the insert/edit-link button. When enabled, pressing it on a
     * collapsed or non-link selection prompts for a URL (via `promptForUrl`,
     * `window.prompt` by default) and wraps the selection in a link; pressing it
     * while a link is selected removes the link.
     *
     * Requires `LinkNode` to be registered (it is, by default) — no extra setup.
     * The entered URL is sanitized (see `sanitizeUrl`) so only
     * http/https/mailto/tel links are written.
     * @default true
     */
    hasLink?: boolean;
    /**
     * Called to obtain a URL when the link button is pressed on a non-link
     * selection. Return the URL string to link, or `null`/`''` to cancel.
     * Receives the currently selected text as a hint. Defaults to
     * `window.prompt`. Override to plug in a custom (e.g. Astryx Dialog) prompt.
     */
    promptForUrl?: (selectedText: string) => string | null | undefined;
    /**
     * Whether links created via the toolbar open in a new tab. When `true`
     * (default), the created link carries `target="_blank"` and
     * `rel="noopener noreferrer"` — written into the link node's data (so it
     * serializes and round-trips), not patched onto the DOM. Set `false` to
     * create same-tab links.
     * @default true
     */
    linkOpensInNewTab?: boolean;
    /**
     * Extra items rendered at the end of the toolbar (after a divider). Use this
     * to compose product-specific controls (e.g. mentions, AI) alongside the
     * default formatting buttons.
     */
    endContent?: ReactNode;
}
/**
 * A composable formatting toolbar for {@link RichTextEditor}, built from Astryx
 * `Toolbar` / `ToggleButton` primitives so it matches the active theme. Reads
 * the current selection to keep the active states in sync and dispatches the
 * standard Lexical formatting commands.
 *
 * Render it inside the editor's `plugins` slot — it uses
 * `useLexicalComposerContext()` to reach the editor, so it must live within the
 * `LexicalComposer` the editor sets up.
 *
 * @example
 * ```
 * import {RichTextEditor, RichTextEditorToolbar} from '@astryxdesign/lab';
 *
 * <RichTextEditor
 *   label="Notes"
 *   plugins={<RichTextEditorToolbar />}
 * />
 * ```
 */
export declare function RichTextEditorToolbar({ label, headingLevels, size, hasLink, promptForUrl, linkOpensInNewTab, endContent, }: RichTextEditorToolbarProps): import("react").JSX.Element;
export declare namespace RichTextEditorToolbar {
    var displayName: string;
}
//# sourceMappingURL=RichTextEditorToolbar.d.ts.map