import type { IComponentSchema } from '../serialization/IComponentSchema';
import type { IMatrixContext } from '../engine/core/IMatrixContext';
import { MatrixActor } from '../core/MatrixActor';
/**
 * Result of schema evaluation.
 */
export interface ISchemaEvalResult {
    /** Mount path of the created component */
    mount: string;
    /** The created component instance */
    component: MatrixActor;
    /** External adapter ID (e.g., shell tag) if applicable */
    adapterId?: string;
    /** Mount paths of child components */
    childMounts: string[];
}
/**
 * Options for schema evaluation.
 */
export interface ISchemaEvalOptions {
    /** Parent context to derive child context from */
    parentContext?: IMatrixContext;
    /** Slot to place component in */
    slot?: string;
    /** Override lifecycle mode */
    lifecycleMode?: 'matrix-owned' | 'external-owned';
    /** Skip shell creation (headless mode) */
    headless?: boolean;
}
/**
 * SchemaEvaluator - The EVAL step of Matrix's homoiconicity.
 *
 * Transforms IComponentSchema (data) into running MatrixActor (execution).
 *
 * TIMING GUARANTEES (Vision 45 §6):
 * 1. Component is ALWAYS created before DOM shell (matrix-owned scenario)
 * 2. Children evaluated in order (serial by default for predictability)
 * 3. Ready promise resolves only when component AND dependencies are ready
 * 4. Parent sees childAdded event BEFORE shell appears in DOM
 *
 * @example
 * ```typescript
 * const evaluator = new SchemaEvaluator(context);
 * const result = await evaluator.eval(schema);
 * console.log(result.mount); // "parent.child"
 * ```
 */
export declare class SchemaEvaluator {
    private readonly context;
    private readonly runtime;
    constructor(context: IMatrixContext);
    /**
     * Evaluate a schema into a running component.
     *
     * EXECUTION ORDER (critical for timing):
     * 1. Create component instance (before any DOM)
     * 2. Compile and attach handlers
     * 3. Initialize component
     * 4. Evaluate children recursively (components first, then shells)
     * 5. Register external adapter (shell) with existing component
     * 6. Wire bindings
     * 7. Wait for ready based on readyMode
     */
    eval(schema: IComponentSchema, options?: ISchemaEvalOptions): Promise<ISchemaEvalResult>;
    /**
     * Create component from schema.
     *
     * Strategy selection:
     * 1. componentType → Use registered class
     * 2. handlers → Dynamic compilation
     * 3. Neither → Anonymous structural component
     */
    private _createComponent;
    /**
     * Compile dynamic component from handlers.
     *
     * Creates an anonymous class with handlers attached.
     */
    private _compileDynamicComponent;
    /**
     * Create structural component (no handlers, just composition).
     */
    private _createStructuralComponent;
    /**
     * Attach handlers from schema to component.
     */
    private _attachHandlers;
    /**
     * Compile a handler definition into a callable function.
     */
    private _compileHandler;
    /**
     * Compile JavaScript handler code.
     */
    private _compileJavaScriptHandler;
    /**
     * Compile LISP handler code.
     *
     * NOTE: Full LISP integration requires the LISP interpreter.
     * This is a stub that logs a warning.
     */
    private _compileLispHandler;
    /**
     * Apply initial state to component.
     */
    private _applyState;
    /**
     * Register external adapter (shell) for the component.
     */
    private _registerAdapter;
    /**
     * Set up reactive tracking subscriptions.
     */
    private _setupTracking;
    /**
     * Resolve track source to a mount path.
     *
     * Supported formats:
     *   "/absolute.mount"       → "absolute.mount"
     *   "../sibling-name"       → parent + sibling-name  (sibling resolution)
     *   "../../uncle/cousin"    → grandparent + uncle.cousin
     *   "child-name"            → context.mount + child-name
     */
    private _resolveTrackMount;
    /**
     * Set up event bindings.
     */
    private _setupBindings;
    /**
     * Wait for component to be ready based on readyMode.
     */
    private _waitForReady;
    /**
     * Create a context for an absolute mount path.
     */
    private _createContextForMount;
}
//# sourceMappingURL=SchemaEvaluator.d.ts.map