/**
 * Widget Types
 * Simplified appearance configuration
 */
export type WidgetPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
export type WidgetSize = 'small' | 'medium' | 'large';
export type WelcomeBubbleFrequency = 'always' | 'session' | 'weekly' | 'monthly';
export type TriggerType = 'button' | 'pill-text' | 'input-bar';
export interface WidgetAppearance {
    primaryColor: string;
    position: WidgetPosition;
    size: WidgetSize;
    logo?: string;
    triggerType?: TriggerType;
    triggerText?: string;
    headerTitle: string;
    welcomeTitle?: string;
    welcomeMessage: string;
    placeholder: string;
    welcomeBubbleText?: string;
    welcomeBubbleFrequency?: WelcomeBubbleFrequency;
}
export interface FollowUpSuggestion {
    id: string;
    text: string;
    type: 'question' | 'action';
    actionId?: string;
    actionInput?: Record<string, unknown>;
}
export interface ActionPreset {
    actionId: string;
    displayText: string;
    prefilledInput?: Record<string, unknown>;
    enabled: boolean;
}
export interface WidgetSettings {
    autoOpen: boolean;
    autoOpenDelay?: number;
    persistConversation: boolean;
    showChatHistory?: boolean;
    showTimestamps: boolean;
    showTypingIndicator: boolean;
    showToolCalls?: boolean;
    enableFileUpload: boolean;
    enableFeedback: boolean;
    maxMessagesPerSession?: number;
    suggestedQuestions?: (string | {
        text: string;
        actionId?: string;
    })[];
    enableFollowUpSuggestions?: boolean;
    actionPresets?: ActionPreset[];
    showDataPolicy?: boolean;
}
export interface WidgetBehavior {
    agentic: boolean;
    fallbackMessage?: string;
}
export interface WidgetConfig {
    appearance: WidgetAppearance;
    settings: WidgetSettings;
    behavior: WidgetBehavior;
    knowledgeBases: string[];
    actions?: string[];
}
export interface FileAttachment {
    name: string;
    size: number;
    extension: string;
}
export type KbDocument = {
    kbId: string;
    score?: number;
    doc: {
        pageContent: string;
        id: string;
        metadata: Record<string, unknown>;
    };
};
export type JsonValue = string | number | boolean | null | {
    [key: string]: JsonValue;
} | JsonValue[];
export type MessageRole = "system" | "user" | "assistant" | "tool" | "developer";
export type MessageContent = string | null | undefined;
export interface BaseMessage {
    role: MessageRole;
    content?: MessageContent;
    name?: string;
}
export interface ToolCallFunction {
    name: string;
    arguments: string;
}
export interface ToolCall {
    id?: string;
    type?: "function";
    function: ToolCallFunction;
}
export interface SystemMessage extends BaseMessage {
    role: "system";
    content: string;
}
export interface UserMessage extends BaseMessage {
    role: "user";
    content: string;
}
export interface DeveloperMessage extends BaseMessage {
    role: "developer";
    content: string;
}
export interface AssistantMessage extends BaseMessage {
    role: "assistant";
    tool_calls?: ToolCall[];
}
export interface ToolMessage extends BaseMessage {
    role: "tool";
    tool_call_id: string;
}
export type AnyMessage = SystemMessage | UserMessage | DeveloperMessage | AssistantMessage | ToolMessage;
export interface ConversationMessage {
    id: string;
    message: AnyMessage;
    timestamp: string;
    sources: KbDocument[];
    feedback?: "positive" | "negative";
    isError?: boolean;
    isStreaming?: boolean;
    toolExecuting?: string;
    toolCallToActionId?: Record<string, string>;
    action?: {
        implementation: string;
        toolCallId: string;
        actionId: string;
        input: Record<string, JsonValue>;
        state: Record<string, JsonValue>;
        done?: boolean;
        hidden?: boolean;
        dismissedAt?: string;
        dismissedBy?: "user";
    };
    suggestions?: FollowUpSuggestion[];
}
export type StreamEvent = {
    type: "content";
    content: string;
    timestamp: string;
} | {
    type: "tool_start";
    tool_name: string;
    tool_call_id: string;
    timestamp: string;
} | {
    type: "tool_end";
    tool_name: string;
    tool_call_id: string;
    timestamp: string;
    state?: Record<string, JsonValue>;
    input?: Record<string, JsonValue>;
    action_id?: string;
    implementation?: string;
    done: boolean;
} | {
    type: "tool_error";
    tool_name: string;
    tool_call_id: string;
    error: string;
    timestamp: string;
} | {
    type: "halt";
    tool_calls: {
        tool_call_id: string;
        name: string;
        arguments: string;
    }[];
    timestamp: string;
} | {
    type: "action_request";
    tool_call_id: string;
    action_id: string;
    implementation: string;
    input: Record<string, JsonValue>;
    state: Record<string, JsonValue>;
    done: boolean;
    messages: AnyMessage[];
    tool_call_to_action_id: Record<string, string>;
    timestamp: string;
} | {
    type: "done";
    messages: AnyMessage[];
    sources: KbDocument[];
    tool_call_to_action_id: Record<string, string>;
    suggestions?: FollowUpSuggestion[];
    timestamp: string;
} | {
    type: "error";
    error: string;
    timestamp: string;
};
export type WidgetMode = 'bubble' | 'inline' | 'embedded';
export interface WidgetProps {
    widgetId?: string;
    apiUrl?: string;
    mode?: WidgetMode;
    previewMode?: boolean;
    previewConfig?: Partial<WidgetConfig>;
    demoMode?: boolean;
    demoInput?: string;
    demoOutput?: string;
    onDemoComplete?: () => void;
    position?: WidgetPosition;
    primaryColor?: string;
    size?: WidgetSize;
    headerTitle?: string;
    welcomeTitle?: string;
    welcomeMessage?: string;
    placeholder?: string;
    welcomeBubbleText?: string;
    triggerType?: TriggerType;
    triggerText?: string;
    theme?: 'light' | 'dark';
    suggestedQuestions?: (string | {
        text: string;
        actionId?: string;
    })[];
    customStyles?: Record<string, string>;
    currentRoute?: string;
    defaultOpen?: boolean;
    zIndex?: number;
    containerMode?: boolean;
    onOpen?: () => void;
    onClose?: () => void;
    onMessage?: (message: ConversationMessage) => void;
    onError?: (error: Error) => void;
}
export interface ChatState {
    messages: ConversationMessage[];
    isOpen: boolean;
    isLoading: boolean;
    isTyping: boolean;
    error: string | null;
    conversationId: string;
    config: WidgetConfig | null;
}
//# sourceMappingURL=index.d.ts.map