/**
 * Global type definitions for ChatGPT Apps SDK
 * Auto-loaded when importing @ainativekit/ui
 *
 * @packageDocumentation
 */
/**
 * ChatGPT Apps SDK interface for window.openai global
 *
 * @example
 * ```typescript
 * import '@ainativekit/ui';
 *
 * // Access ChatGPT context
 * const data = window.openai?.toolOutput;
 * const theme = window.openai?.theme;
 *
 * // Send follow-up message
 * window.openai?.sendFollowUpMessage({ prompt: 'What is the weather?' });
 * ```
 */
export interface OpenAIGlobal {
    /**
     * Tool output data from MCP response
     * Parse with JSON.parse(window.openai.toolOutput)
     *
     * @example
     * ```typescript
     * const output = window.openai?.toolOutput;
     * if (output) {
     *   const data = JSON.parse(output);
     *   console.log(data);
     * }
     * ```
     */
    toolOutput?: string;
    /**
     * Current theme mode
     *
     * @example
     * ```typescript
     * const isDark = window.openai?.theme === 'dark';
     * ```
     */
    theme?: 'light' | 'dark';
    /**
     * Current display mode
     *
     * @example
     * ```typescript
     * const isFullscreen = window.openai?.displayMode === 'fullscreen';
     * ```
     */
    displayMode?: 'inline' | 'pip' | 'fullscreen';
    /**
     * Persistent widget state
     * State persists across ChatGPT sessions
     *
     * @example
     * ```typescript
     * const currentState = window.openai?.widgetState;
     * ```
     */
    widgetState?: Record<string, any>;
    /**
     * Update widget state
     * State persists across ChatGPT sessions
     *
     * @param state - New state object to merge with existing state
     *
     * @example
     * ```typescript
     * window.openai?.setWidgetState({ count: 42, user: 'alice' });
     * ```
     */
    setWidgetState?: (state: Record<string, any>) => void;
    /**
     * Call an MCP tool
     *
     * @param name - Tool name as defined in MCP server
     * @param args - Tool arguments object
     * @returns Promise resolving to tool result
     *
     * @example
     * ```typescript
     * const result = await window.openai?.callTool('get_weather', {
     *   location: 'San Francisco'
     * });
     * ```
     */
    callTool?: (name: string, args: Record<string, any>) => Promise<any>;
    /**
     * Send follow-up message to ChatGPT
     *
     * @param message - Message object with prompt
     *
     * @example
     * ```typescript
     * window.openai?.sendFollowUpMessage({
     *   prompt: 'Show me more details'
     * });
     * ```
     */
    sendFollowUpMessage?: (message: {
        prompt: string;
    }) => void;
}
declare global {
    interface Window {
        /**
         * ChatGPT Apps SDK global
         * Available when your app is running inside ChatGPT
         *
         * @example
         * ```typescript
         * if (window.openai) {
         *   console.log('Running in ChatGPT:', window.openai.theme);
         * }
         * ```
         */
        openai?: OpenAIGlobal;
    }
}
export {};
//# sourceMappingURL=global.d.ts.map