import { Signal, Value } from '@tempots/dom';
import { type LexicalEditor, type TextFormatType, type RangeSelection, type ElementNode, type LexicalCommand } from 'lexical';
import { ControlSize } from '../../theme';
/**
 * Create reactive state and action helpers for Lexical toolbar integration.
 * Both the docked toolbar and floating toolbar share these helpers.
 */
export declare function createToolbarHelpers(ed: Signal<LexicalEditor>, stateUpdate: Signal<number>, options?: {
    enterUrlMessage?: () => string;
}): {
    withSelection: <T>(fn: (sel: RangeSelection) => T, fallback: T) => Signal<T>;
    getAnchorElement: (sel: RangeSelection) => ElementNode | import("lexical").TextNode;
    textFormatActive: (fmt: TextFormatType) => Signal<boolean>;
    blockTypeActive: (type: string) => Signal<boolean>;
    listTypeActive: (listType: string) => Signal<boolean>;
    headingActive: (level: number) => import("@tempots/dom").Computed<boolean>;
    linkActive: () => Signal<boolean>;
    dispatch: <T>(command: LexicalCommand<T>, payload: T) => () => void;
    toggleBlock: (type: string, create: () => ElementNode) => () => void;
    toggleLink: () => void;
};
/**
 * Create a button factory bound to shared readOnly and size props.
 * Returns a function that takes a display signal and produces
 * a group-specific button builder.
 */
export declare function createButtonFactory(readOnly: Signal<boolean>, size: Value<ControlSize>): (display: Signal<boolean>) => (opts: {
    active: Signal<boolean>;
    onClick: () => void;
    label: Value<string>;
    icon: string;
}) => import("@tempots/dom").Renderable;
