import * as react from 'react';
import { ReactNode } from 'react';
import { Editor } from '@tiptap/react';
import { Extensions } from '@tiptap/core';

interface RichTextEditorToolbarState {
    editor: Editor | null;
    isBold: boolean;
    isItalic: boolean;
    isH2: boolean;
    isBullet: boolean;
}
interface DefaultToolbarProps extends RichTextEditorToolbarState {
}
/** Default Bold / Italic / H2 / Bullet-list toolbar. */
declare function DefaultToolbar({ editor, isBold, isItalic, isH2, isBullet, }: DefaultToolbarProps): react.JSX.Element;

/** Swappable extension set — replaces the default toolbar extensions when provided. */
interface EditorExtensionConfig {
    extensions: Extensions;
}
/** Production-proven default set (no StarterKit). */
declare function createDefaultExtensions(): Extensions;

interface RichTextEditorProps {
    value: string;
    onChange: (next: string) => void;
    dir?: 'ltr' | 'rtl';
    'aria-label': string;
    extensions?: EditorExtensionConfig;
    readOnly?: boolean;
    className?: string;
    renderToolbar?: (state: RichTextEditorToolbarState) => ReactNode;
}
declare function RichTextEditor({ value, onChange, dir, 'aria-label': ariaLabel, extensions, readOnly, className, renderToolbar, }: RichTextEditorProps): react.JSX.Element;

export { DefaultToolbar, type EditorExtensionConfig, RichTextEditor, type RichTextEditorProps, type RichTextEditorToolbarState, createDefaultExtensions };
