import { Types } from "@a2ui/lit/0.8"; import type { A2UIActionEvent } from "../types/index.js"; export interface UseA2UIReturn { /** Map of all surfaces */ surfaces: ReadonlyMap; /** Get a specific surface by ID */ getSurface: (surfaceId: string) => Types.Surface | undefined; /** Process incoming A2UI messages from the server */ processMessages: (messages: Types.ServerToClientMessage[]) => void; /** Send an action event to the server */ sendAction: (action: A2UIActionEvent) => void; /** Get the root component tree for a surface */ getComponentTree: (surfaceId: string) => Types.AnyComponentNode | null; /** Clear all surfaces */ clearSurfaces: () => void; } /** * Main hook for interacting with A2UI. * Provides access to surfaces, message processing, and action sending. * * @example * ```tsx * function MyComponent() { * const { surfaces, processMessages, sendAction } = useA2UI(); * * // Process messages from server * useEffect(() => { * fetch('/api/a2ui').then(res => res.json()).then(processMessages); * }, []); * * // Render surfaces * return ; * } * ``` */ export declare function useA2UI(): UseA2UIReturn; //# sourceMappingURL=useA2UI.d.ts.map