/**
 * 时间线容器与节点命令。
 * 包含基础的弹窗配置（方便用户查看支持的类型和选项），输出原生的 Markdown 时间线语法。
 */
import type { EditorView } from "@codemirror/view";
import { FormDialog } from "../../../editor/dialog/FormDialog.js";
import { Command, type CommandContext } from "../../../editor/commands/Command";
import type { DialogCapableCommand } from "../../../editor/commands/DialogCommand";
import type { DialogType } from "../../../editor/commands/dialogTypes";
export interface TimelineContainerDialogResult {
    placement: string;
    lineStyle: string;
}
export interface TimelineNodeDialogResult {
    title: string;
    time: string;
    type: string;
    content: string;
}
declare class TimelineContainerDialog extends FormDialog<TimelineContainerDialogResult> {
    /** 返回时间线容器弹窗标题。 */
    get title(): string;
    readonly fields: {
        name: string;
        label: string;
        type: "select";
        options: {
            value: string;
            label: string;
        }[];
        defaultValue: string;
    }[];
    /**
     * 将容器配置字段转换为时间线属性。
     * @param raw - 表单提交的字段值
     * @returns 包含布局和连线样式的容器数据
     */
    toResult(raw: Record<string, string | boolean>): TimelineContainerDialogResult;
}
declare class TimelineNodeDialog extends FormDialog<TimelineNodeDialogResult> {
    /** 返回时间线节点弹窗标题。 */
    get title(): string;
    readonly fields: ({
        name: string;
        label: string;
        type: "text";
        required: boolean;
        defaultValue: string;
        options?: undefined;
        rows?: undefined;
    } | {
        name: string;
        label: string;
        type: "text";
        required: boolean;
        defaultValue?: undefined;
        options?: undefined;
        rows?: undefined;
    } | {
        name: string;
        label: string;
        type: "select";
        options: {
            value: string;
            label: string;
        }[];
        defaultValue: string;
        required?: undefined;
        rows?: undefined;
    } | {
        name: string;
        label: string;
        type: "textarea";
        rows: number;
        required?: undefined;
        defaultValue?: undefined;
        options?: undefined;
    })[];
    /**
     * 为节点时间字段提供当天的默认值。
     * @param props - 调用方传入的预填充属性
     * @returns 带默认日期的弹窗属性
     */
    prepareProps(props: Record<string, unknown>): Record<string, unknown>;
    /**
     * 将表单字段转换为时间线节点数据。
     * @param raw - 表单提交的字段值
     * @returns 标题为空时返回 null，否则返回节点数据
     */
    toResult(raw: Record<string, string | boolean>): TimelineNodeDialogResult | null;
}
export declare const timelineContainerDialog: TimelineContainerDialog;
export declare const timelineNodeDialog: TimelineNodeDialog;
export declare class TimelineContainerCommand implements Command, DialogCapableCommand {
    readonly dialogType: DialogType;
    renderDialog: (host: HTMLElement, props: Record<string, unknown>, callbacks: import("../../../editor/commands/DialogCommand").DialogCallbacks<TimelineContainerDialogResult>) => () => void;
    /**
     * 请求容器配置并插入含默认节点的时间线。
     * @param view - 要修改的 CodeMirror 编辑器实例
     * @param _payload - 未使用的命令参数
     * @param ctx - 提供事件总线的命令上下文
     * @returns 用户取消或缺少事件总线时返回 false
     */
    execute(view: EditorView, _payload: unknown, ctx: CommandContext): Promise<boolean>;
}
export declare class TimelineNodeCommand implements Command, DialogCapableCommand {
    readonly dialogType: DialogType;
    renderDialog: (host: HTMLElement, props: Record<string, unknown>, callbacks: import("../../../editor/commands/DialogCommand").DialogCallbacks<TimelineNodeDialogResult>) => () => void;
    /**
     * 请求节点配置并在当前选区处插入时间线节点。
     * @param view - 要修改的 CodeMirror 编辑器实例
     * @param _payload - 未使用的命令参数
     * @param ctx - 提供事件总线的命令上下文
     * @returns 用户取消或缺少事件总线时返回 false
     */
    execute(view: EditorView, _payload: unknown, ctx: CommandContext): Promise<boolean>;
}
export declare const timelineContainerCommand: TimelineContainerCommand;
export declare const timelineNodeCommand: TimelineNodeCommand;
export {};
//# sourceMappingURL=TimelineCommand.d.ts.map