import type { Diagnostic } from "@codemirror/lint";
import { useWorkflowTopology } from "./useWorkflowTopology";
/** Options for {@link useWorkflowEditor}. */
export interface UseWorkflowEditorOptions {
    /** Organization slug for the save path. */
    readonly org: string;
}
/** Return value of {@link useWorkflowEditor}. */
export interface UseWorkflowEditorReturn {
    /** Current YAML content in the editor. */
    readonly yaml: string;
    /** Update the YAML content (called by the editor on change). */
    readonly setYaml: (value: string) => void;
    /** CodeMirror-compatible diagnostics from the validation pipeline. */
    readonly diagnostics: readonly Diagnostic[];
    /** `true` when the editor content differs from the initial value. */
    readonly isDirty: boolean;
    /** `true` while a save request is in flight. */
    readonly isSaving: boolean;
    /** Error from the last failed save, or `null` on success. */
    readonly saveError: Error | null;
    /** Persist the current YAML to the server. Returns `true` on success. */
    readonly save: () => Promise<boolean>;
    /** Reset the editor to the initial YAML (discards changes). */
    readonly reset: () => void;
    /** Topology data for the graph preview. */
    readonly topology: ReturnType<typeof useWorkflowTopology>;
    /** Count of error-level diagnostics. */
    readonly errorCount: number;
    /** Count of warning-level diagnostics. */
    readonly warningCount: number;
    /** Current version message (optional description of what changed). */
    readonly versionMessage: string;
    /** Update the version message. */
    readonly setVersionMessage: (value: string) => void;
}
/**
 * Behavior hook that orchestrates the workflow YAML editor experience.
 *
 * Composes the validation pipeline, topology computation, and save logic
 * into a single return value that the `WorkflowEditorView` renders.
 *
 * @param initialYaml - The YAML string to initialize the editor with.
 * @param options - Editor configuration (organization slug).
 *
 * @since T10 (YAML Editor with Graph Preview)
 */
export declare function useWorkflowEditor(initialYaml: string, options: UseWorkflowEditorOptions): UseWorkflowEditorReturn;
//# sourceMappingURL=useWorkflowEditor.d.ts.map