/**
* React hooks for the AgentKit.
*
* These hooks allow advanced usage such as manual element registration,
* custom commands, and bridge status monitoring.
*/
import type { ElementInfo, ElementHandlers } from './types';
import type { AgentKitContextValue } from './AgentKitProvider';
/**
* Access the AgentKit context.
*
* @example
* ```tsx
* function MyScreen() {
* const { isRunning, elementCount, rescan } = useAgentKit();
*
* return (
*
* Bridge running: {isRunning ? 'Yes' : 'No'}
* Elements: {elementCount}
*
*
* );
* }
* ```
*/
export declare function useAgentKit(): AgentKitContextValue;
/**
* Register a UI element with the AgentKit for AI agent interaction.
*
* Use this when automatic introspection doesn't pick up an element,
* or when you want to provide better metadata/labels.
*
* @example
* ```tsx
* function CustomButton({ onPress, label }: Props) {
* const ref = useRef(null);
*
* useAgentKitElement('my-custom-btn', {
* type: 'button',
* label,
* state: { disabled: false, selected: false },
* position: { x: 0, y: 0, width: 0, height: 0 },
* children: [],
* actions: ['tap'],
* }, ref, { onPress });
*
* return (
*
* {label}
*
* );
* }
* ```
*/
export declare function useAgentKitElement(id: string, info: Omit, ref: React.RefObject, handlers?: ElementHandlers): void;
/**
* Get a rescan trigger for the AgentKit.
*
* Useful when you know the screen content has changed (e.g. after
* navigation or data loading) and want to update the element registry
* immediately rather than waiting for the next periodic scan.
*
* @example
* ```tsx
* function MyComponent() {
* const triggerRescan = useAgentKitRescan();
*
* useEffect(() => {
* // After data loads, trigger a rescan
* fetchData().then(() => triggerRescan());
* }, []);
* }
* ```
*/
export declare function useAgentKitRescan(): () => void;
/**
* Monitor the AgentKit status.
*
* @example
* ```tsx
* function StatusBar() {
* const { isRunning, elementCount } = useAgentKitStatus();
* return {isRunning ? `🟢 ${elementCount} elements` : '🔴 Offline'};
* }
* ```
*/
export declare function useAgentKitStatus(): {
isRunning: boolean;
elementCount: number;
};
//# sourceMappingURL=hooks.d.ts.map