/**
 * FlowCanvas — V3 UI Projection Canvas
 *
 * The canvas IS the app. Nodes show rendered UI thumbnails from
 * render-ui effects. Edges show events connecting screens.
 *
 * Two navigation levels:
 *   Level 1 (Overview): One node per orbital showing INIT UI
 *   Level 2 (Expanded): One node per UI state within an orbital
 *
 * Double-click to expand an orbital. Click a node for code callback.
 * Escape to go back. AVL overlays on hover (future).
 */
import React from 'react';
import type { OrbitalSchema } from '@almadar/core';
import type { ViewLevel, PreviewNodeData } from '../../molecules/avl/avl-preview-types';
import type { ComposeViewLevel, BehaviorCanvasEntry, BehaviorWireEdgeData } from '../../molecules/avl/avl-behavior-compose-types';
export interface FlowCanvasProps {
    schema: OrbitalSchema | string;
    mockData?: Record<string, unknown[]>;
    className?: string;
    width?: number | string;
    height?: number | string;
    onNodeClick?: (context: {
        level: ViewLevel | 'code';
        orbital: string;
        trait?: string;
        transition?: string;
    }) => void;
    onLevelChange?: (level: ViewLevel, orbital?: string) => void;
    /**
     * GAP-52: fired when the user double-clicks an orbital. Consumers (e.g. the
     * builder workspace) use this as the trigger to enter cosmic mode
     * (`AvlOrbitalsCosmicZoom`) for the focused orbital.
     *
     * The level at which this fires is controlled by `cosmicEntryLevel` (default
     * `'expanded'`). At `'expanded'` the existing overview→expanded drill is
     * preserved — the callback fires only on the second double-click. At
     * `'overview'` the callback fires on the FIRST double-click and the existing
     * drill is suppressed for that interaction. `'both'` fires at either level.
     *
     * The callback runs unconditionally — persona / permission gating is the
     * consumer's responsibility.
     */
    onOrbitalDoubleClick?: (orbital: string) => void;
    /**
     * GAP-53: which level the `onOrbitalDoubleClick` callback fires at.
     * - `'expanded'` (default, non-breaking) — fires only at L2 expanded; the
     *   first overview double-click still drills overview→expanded.
     * - `'overview'` — fires at L1 overview on the FIRST double-click. The
     *   overview→expanded drill is suppressed when the callback is provided.
     * - `'both'` — fires at either level.
     */
    cosmicEntryLevel?: 'expanded' | 'overview' | 'both';
    initialOrbital?: string;
    /** Start at Level 2 (expanded) when initialOrbital is set. Default: 'overview'. */
    initialLevel?: ViewLevel;
    /** Pre-select a node on mount (opens OrbInspector). */
    initialSelectedNode?: PreviewNodeData;
    /** Enable editing in the inspector. When true, fields become inputs. */
    editable?: boolean;
    /** Called when the user edits the schema via the inspector. */
    onSchemaChange?: (schema: OrbitalSchema) => void;
    /** Called when the user presses Delete/Backspace with a pattern selected. */
    onPatternDelete?: (context: {
        patternId: string;
        nodeData: PreviewNodeData;
    }) => void;
    /** Called when the user drags from a source handle to a target handle (event wiring). */
    onEventWire?: (wire: {
        eventName: string;
        sourceOrbital: string;
        targetOrbital: string;
        sourceTraitName?: string;
        targetTraitName?: string;
    }) => void;
    /** Behavior layer metadata for node styling (layer color bands). */
    behaviorMeta?: Record<string, {
        layer: string;
    }>;
    /** Layout hint: 'pipeline' renders nodes left-to-right, 'grid' (default) uses sqrt-based grid. */
    layoutHint?: 'pipeline' | 'grid';
    /** Called when the user clicks a node in overview level (for composition hints). */
    onNodeSelect?: (orbitalName: string) => void;
    /** When 'behavior', shows behavior-level glyph nodes instead of orbital previews. */
    composeLevel?: ComposeViewLevel;
    /** Behavior entries for compose mode (only when composeLevel='behavior'). */
    behaviorEntries?: BehaviorCanvasEntry[];
    /** Event wires between behaviors (only when composeLevel='behavior'). */
    behaviorWires?: BehaviorWireEdgeData[];
    /** @deprecated Use onNodeClick instead. Kept for AvlCosmicZoom compat. */
    onZoomChange?: (level: string, context: Record<string, string | undefined>) => void;
    /** @deprecated Not used in V3. */
    focusTarget?: {
        type: string;
        name: string;
    };
    /** @deprecated Not used in V3. */
    color?: string;
    /** @deprecated Not used in V3. */
    animated?: boolean;
    /** @deprecated Not used in V3. */
    initialTrait?: string;
    /** @deprecated Not used in V3. */
    stateCoverage?: Record<string, string>;
}
export declare const FlowCanvas: React.FC<FlowCanvasProps>;
