import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ReactNode } from 'react';

interface ChatSidebarProps {
    /**
     * Whether the sidebar is open
     */
    isOpen: boolean;
    /**
     * Optional title for the sidebar header
     * @default 'Details'
     */
    title?: string;
    /**
     * Sidebar content
     */
    children: ReactNode;
    /**
     * Optional fixed width in pixels
     * @default 320
     */
    width?: number;
    /**
     * Optional z-index for layering
     * @default 10
     */
    zIndex?: number;
}
/**
 * Shared chat sidebar component
 *
 * Provides a sliding sidebar panel that animates from the right side.
 * Used across AI Studio sessions and Agent Chat for displaying contextual details.
 *
 * Features:
 * - Smooth transform-based sliding animation
 * - Fixed width with absolute positioning
 * - Theme-aware styling with CSS variables
 * - Customizable header with optional actions
 * - Flexible content area via children prop
 *
 * Layout Pattern:
 * Parent container must have `position: relative` and the content area should
 * adjust its `marginRight` to match the sidebar width when open.
 *
 * @example
 * ```tsx
 * <div style={{ position: 'relative', height: '100vh' }}>
 *   <div style={{
 *     marginRight: isSidebarOpen ? '320px' : '0',
 *     transition: 'margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1)'
 *   }}>
 *     // Main content
 *   </div>
 *   <ChatSidebar isOpen={isSidebarOpen} onClose={() => setIsOpen(false)}>
 *     // Sidebar content
 *   </ChatSidebar>
 * </div>
 * ```
 */
declare function ChatSidebar({ isOpen, title, children, width, zIndex }: ChatSidebarProps): react_jsx_runtime.JSX.Element;

interface ChatHeaderProps {
    title: string;
    status?: {
        label: string;
        color: 'green' | 'gray' | 'red' | 'yellow' | 'blue';
    };
    contextUsage?: {
        used: number;
        total: number;
    };
    sidebarIcon?: ReactNode;
    onToggleSidebar?: () => void;
    isSidebarOpen?: boolean;
    sidebarTooltip?: string;
}
/**
 * Shared chat header component
 * Displays title, status badge, context usage, and optional sidebar toggle
 */
declare function ChatHeader({ title, status, contextUsage, sidebarIcon, onToggleSidebar, isSidebarOpen, sidebarTooltip }: ChatHeaderProps): react_jsx_runtime.JSX.Element;

interface ChatInputAreaProps {
    input: string;
    onInputChange: (value: string) => void;
    onSend: () => void;
    isDisabled?: boolean;
    isProcessing?: boolean;
    isConnected?: boolean;
    placeholder?: string;
}
/**
 * Tactical chat input area with focus glow and accent send button.
 */
declare const ChatInputArea: react.NamedExoticComponent<ChatInputAreaProps>;

type MessageType = MessageEvent['type'];
interface ChatMessage {
    id: string;
    role: 'user' | 'assistant';
    messageType: MessageType;
    text: string;
    metadata?: MessageEvent;
    turnNumber: number;
    messageIndex?: number;
    createdAt: Date;
}

/**
 * Base Execution Engine type definitions
 * Core types shared across all Execution Engine resources
 */

/**
 * Unified message event type - covers all message types in sessions
 * Replaces separate SessionTurnMessages and AgentActivityEvent mechanisms
 */
/**
 * Structured action metadata attached to assistant messages.
 * Frontend reads this instead of parsing text prefixes.
 */
type AssistantAction = {
    kind: 'navigate';
    path: string;
    reason: string;
} | {
    kind: 'update_filters';
    timeRange: string | null;
    statusFilter: string | null;
    searchQuery: string | null;
};
type MessageEvent = {
    type: 'user_message';
    text: string;
} | {
    type: 'assistant_message';
    text: string;
    _action?: AssistantAction;
} | {
    type: 'agent:started';
} | {
    type: 'agent:completed';
} | {
    type: 'agent:error';
    error: string;
} | {
    type: 'agent:reasoning';
    iteration: number;
    reasoning: string;
} | {
    type: 'agent:tool_call';
    toolName: string;
    args: Record<string, unknown>;
} | {
    type: 'agent:tool_result';
    toolName: string;
    success: boolean;
    result?: unknown;
    error?: string;
};

interface ChatInterfaceProps {
    messages: ChatMessage[];
    input: string;
    onInputChange: (value: string) => void;
    onSendMessage: () => void;
    className?: string;
    style?: React.CSSProperties;
    isProcessing?: boolean;
    isConnected?: boolean;
    error?: string | null;
    onClearError?: () => void;
    emptyStateText?: string;
    emptyStateSubtext?: string;
    placeholder?: string;
    messageAreaVariant?: 'grid' | 'plain';
    /**
     * When false, only user/assistant text messages render — agent-activity
     * bubbles (reasoning, tool calls/results, errors) are filtered out. Defaults
     * to true so studio/session surfaces keep showing full activity.
     */
    showAgentActivity?: boolean;
}
/**
 * Shared chat interface component
 * Used across ai studio sessions and production agent chat
 * Handles message display, auto-scroll, and input area
 */
declare function ChatInterface({ messages, input, onInputChange, onSendMessage, className, style, isProcessing, isConnected, error, onClearError, emptyStateText, emptyStateSubtext, placeholder, messageAreaVariant, showAgentActivity }: ChatInterfaceProps): react_jsx_runtime.JSX.Element;

interface MessageBubbleProps {
    message: ChatMessage;
}
/**
 * Shared chat message bubble component
 * Used across all chat interfaces in the monorepo
 * Supports all 8 message types including agent activity
 */
declare const MessageBubble: react.NamedExoticComponent<MessageBubbleProps>;

/**
 * Animated processing indicator with a light streak effect.
 * Each letter brightens sequentially, creating the illusion
 * of a streak of light sweeping across the text.
 */
declare function ProcessingIndicator(): react_jsx_runtime.JSX.Element;

export { ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, MessageBubble, ProcessingIndicator };
export type { ChatHeaderProps, ChatInputAreaProps, ChatInterfaceProps, ChatSidebarProps, MessageBubbleProps };
