import { type CollaborationUser } from '../lib/collaboration-provider.js';
/**
 * Configuration for real-time collaboration on this editor.
 *
 * When supplied the editor switches into CRDT mode: history is delegated to
 * Yjs, edits sync through the cms-core realtime gateway, and a presence
 * strip with live cursors appears beside the toolbar. The `content` prop is
 * ignored in collaboration mode (the gateway is the source of truth);
 * `onChange` still fires on every local update so existing autosave wiring
 * keeps working.
 */
export interface TipTapCollaborationConfig {
    documentId: string;
    /**
     * Base URL of the realtime gateway. `wss://your.app/api/cms/realtime/sync`
     * in production, `ws://localhost:3000/api/cms/realtime/sync` for dev.
     */
    url: string;
    user: CollaborationUser;
    /** Extra query params (e.g. auth token for cross-origin deployments). */
    params?: Record<string, string>;
}
export interface TipTapEditorProps {
    content: string;
    onChange: (html: string) => void;
    placeholder?: string;
    editable?: boolean;
    className?: string;
    /**
     * Toggle the AI co-author bubble menu on text selection.
     * Defaults to `true` when the editor is editable. Set to `false` to opt
     * out (e.g. for preview-only renders, or environments where the
     * `/ai/coauthor` endpoint is intentionally disabled).
     */
    enableAI?: boolean;
    /**
     * Enable real-time collaboration via the cms-core realtime gateway. When
     * set, the editor swaps in Yjs-backed history + the collaboration cursor
     * extension and renders a presence strip above the toolbar.
     */
    collaboration?: TipTapCollaborationConfig;
    /**
     * Enable inline comments. When set, the `CommentMark` extension is
     * loaded and a `CommentSidePanel` renders next to the editor. Anchors
     * are encoded against the active Yjs text node when collaboration is
     * also on, so highlights survive concurrent edits.
     *
     * Comments are independent of the collaboration prop — you can attach
     * comments to a static document, but cross-user "live" highlighting
     * only kicks in when collaboration is also enabled.
     */
    comments?: TipTapCommentsConfig;
}
/**
 * Configuration for the comments side panel. The panel issues REST calls
 * against the slice-4 endpoints; this prop is just the small set of
 * presentation + identity bits the panel can't infer from the editor.
 */
export interface TipTapCommentsConfig {
    documentId: string;
    /** Logged-in user id — gates edit + delete affordances. */
    currentUserId: string;
    /** Set to true to expose moderation actions on every comment. */
    isAdmin?: boolean;
    /** Error sink so the host shell can show a toast. */
    onError?: (message: string) => void;
}
export declare function TipTapEditor({ content, onChange, placeholder, editable, className, enableAI, collaboration, comments, }: TipTapEditorProps): import("react/jsx-runtime").JSX.Element | null;
//# sourceMappingURL=TipTapEditor.d.ts.map