import type { ConnectStartParams, FlowStoreSnapshot, Viewport, WorkflowEdge, WorkflowNode } from "../editor";
type Listener = () => void;
export interface FlowStore {
    /** React subscription hook contract — used by `useSyncExternalStore`. */
    subscribe(listener: Listener): () => void;
    /** Cheap snapshot getter — must return the same ref between mutations. */
    getSnapshot(): FlowStoreSnapshot;
    /** Imperative setters — called by the canvas internals, never by consumers. */
    setNodes(nodes: WorkflowNode[]): void;
    setEdges(edges: WorkflowEdge[]): void;
    setViewport(viewport: Viewport): void;
    setSelection(nodes: ReadonlySet<string>, edges: ReadonlySet<string>): void;
    setConnection(connection: ConnectStartParams | null): void;
}
export interface CreateFlowStoreOptions {
    initialNodes?: WorkflowNode[];
    initialEdges?: WorkflowEdge[];
    initialViewport?: Viewport;
}
/**
 * Build a FlowStore for one canvas instance. Designed to be created in
 * `useState(() => createFlowStore())` inside FlowCanvas so a single
 * `<FlowCanvas>` owns exactly one store and unmounting cleans it up.
 */
export declare function createFlowStore({ initialNodes, initialEdges, initialViewport, }?: CreateFlowStoreOptions): FlowStore;
export {};
//# sourceMappingURL=createFlowStore.d.ts.map