import type { IMatrixContext } from '../core/IMatrixContext';
import type { IIntrospectResult } from './IIntrospectResult';
import type { IRenderOptions } from './IRenderOptions';
/**
 * ComponentProxy - Proxy object wrapping introspect data.
 *
 * Provides:
 * - All accepts commands as callable methods
 * - `.render()` for ghost rendering
 * - Access to introspect metadata
 *
 * Usage:
 * ```typescript
 * const proxy = await ComponentProxy.fromIntrospect(context, 'app.tree');
 * await proxy.setLabel({ label: 'New Label' });
 * proxy.render(document.getElementById('results'));
 * ```
 */
export declare class ComponentProxy {
    private _introspect;
    private _context;
    private _children?;
    constructor(introspect: IIntrospectResult, context: IMatrixContext);
    /**
     * Create a ComponentProxy by calling introspect on a remote mount.
     */
    static fromIntrospect(context: IMatrixContext, mount: string): Promise<ComponentProxy>;
    /**
     * Create a ComponentProxy from existing introspect data.
     */
    static fromData(introspect: IIntrospectResult, context: IMatrixContext): ComponentProxy;
    /**
     * Create a JS Proxy that wraps this ComponentProxy with dynamic method access.
     * Allows calling accepts commands directly: proxy.setLabel({ label: 'foo' })
     */
    asProxy(): this & Record<string, (...args: unknown[]) => Promise<unknown>>;
    /** Get the component's mount path */
    get mount(): string;
    /** Get the component class name */
    get componentClass(): string;
    /** Get list of accepted commands */
    get accepts(): string[];
    /** Get list of emitted events */
    get emits(): string[];
    /** Get the shell tag (custom element name) */
    get shellTag(): string | undefined;
    /** Get the module URL for dynamic loading */
    get moduleUrl(): string | undefined;
    /** Get the full introspect data */
    get introspect(): IIntrospectResult;
    /** Get child proxies (if component has children) */
    get children(): ComponentProxy[];
    /**
     * Send a command to the remote component.
     */
    send<TParams = unknown, TResult = unknown>(command: string, params?: TParams): Promise<TResult>;
    /**
     * Fire-and-forget publish to the component's $inbox.
     */
    publish(command: string, payload?: unknown): void;
    /**
     * Subscribe to an event from the remote component via $events.
     */
    subscribe(event: string, handler: (payload: unknown, meta: {
        topic: string;
        ts: number;
    }) => void): () => void;
    /**
     * Check if this component can be rendered (has shell info).
     */
    get canRender(): boolean;
    /**
     * Render a ghost of this component into a container.
     *
     * The ghost is a local Shell element wired to the remote component
     * via transport. Actions on the ghost control the real component.
     *
     * @param container - The DOM element to render into
     * @param options - Render options
     * @returns The created shell element, or null if rendering is not possible
     */
    render(container: HTMLElement, options?: IRenderOptions): Promise<HTMLElement | null>;
    /**
     * Render a CLONE of this component into a container.
     *
     * ═══════════════════════════════════════════════════════════════════════════
     * ✅ UI CONTROL INVERSION: Uses transport for replica binding
     * ═══════════════════════════════════════════════════════════════════════════
     *
     * Unlike `render()` which creates a proxy (command forwarding only),
     * `renderClone()` creates a full replica that:
     * - Has its own local mount (for FlowPad-specific addressing)
     * - Binds to the original's topic tree (receives same commands)
     * - Emits to both local and original topic trees
     * - Achieves state convergence via deterministic handlers
     *
     * This is the "true clone" mode from VISION-INLINE-RENDERING.md
     *
     * @param container - The DOM element to render into
     * @param options - Render options
     * @returns The created shell element, or null if rendering is not possible
     */
    renderClone(container: HTMLElement, options?: IRenderOptions): Promise<HTMLElement | null>;
    toString(): string;
    toJSON(): IIntrospectResult;
}
/**
 * Create a ComponentProxy from introspect data.
 * Convenience function for use in FlowRunner results.
 */
export declare function createProxy(introspect: IIntrospectResult, context: IMatrixContext): ComponentProxy & Record<string, (...args: unknown[]) => Promise<unknown>>;
//# sourceMappingURL=ComponentProxy.d.ts.map