import * as react_jsx_runtime from 'react/jsx-runtime'; import React__default from 'react'; import { ChatWidgetMessageRole } from './chat-widget-primitives.js'; /** * ChatWidget — WealthX DS (Broker Website Embeddable Chat) * * Two-screen flow: * Screen 1 — TopicGrid: lead selects a conversation topic * Screen 2 — Chat: AI conversation based on selected topic * * Exports (atomic order): * ChatWidgetIntakeForm — Molecule — Screen 1 contact form * ChatWidgetTopicCard — Molecule — Single topic option card * ChatWidgetTopicGrid — Organism — Screen 2 topic selection grid * ChatWidgetInteractiveCard — Molecule — AI-embedded interactive cards * ChatWidgetWindow — Template — 3-screen container + localStorage cache * ChatWidget — Root — Floating widget with FAB launcher * * Pure display component for story control. Real API wiring done in the app layer. */ interface ChatWidgetUser { name: string; phone: string; email: string; } interface ChatWidgetTopic { id: string; icon: React__default.ReactNode; label: string; description?: string; } interface ChatWidgetChatMessage { id: string; role: ChatWidgetMessageRole; content: string; timestamp?: string; isStreaming?: boolean; /** Optional inline interactive card rendered below the message bubble. */ interactiveCard?: ChatWidgetInteractiveCardData; } type ChatWidgetScreen = "intake" | "topics" | "chat" | "booking"; declare const DEFAULT_CHAT_WIDGET_TOPICS: ChatWidgetTopic[]; interface ChatWidgetIntakeFormProps { brokerName?: string; onSubmit: (user: ChatWidgetUser) => void; isSubmitting?: boolean; className?: string; } declare function ChatWidgetIntakeForm({ brokerName, onSubmit, isSubmitting, className, }: ChatWidgetIntakeFormProps): react_jsx_runtime.JSX.Element; interface ChatWidgetTopicCardProps { topic: ChatWidgetTopic; onClick: (topicId: string) => void; className?: string; } declare function ChatWidgetTopicCard({ topic, onClick, className, }: ChatWidgetTopicCardProps): react_jsx_runtime.JSX.Element; interface ChatWidgetTopicGridProps { userName: string; topics?: ChatWidgetTopic[]; onTopicSelect: (topicId: string) => void; className?: string; } declare function ChatWidgetTopicGrid({ userName, topics, onTopicSelect, className, }: ChatWidgetTopicGridProps): react_jsx_runtime.JSX.Element; type ChatWidgetInteractiveCardType = "quick-reply" | "appointment" | "meeting-type" | "confirmation"; type ChatWidgetMeetingTypeId = "video" | "phone" | "in-person"; interface ChatWidgetMeetingTypeOption { id: ChatWidgetMeetingTypeId; label: string; } interface ChatWidgetQuickReplyOption { id: string; label: string; } interface ChatWidgetAppointmentSlot { id: string; /** Human-readable datetime, e.g. "Mon 28 Apr · 2:00 PM" */ datetime: string; type: "video" | "in-person" | "phone"; } /** Data shape for an interactive card — no callbacks, safe to embed in message data. */ interface ChatWidgetInteractiveCardData { type: ChatWidgetInteractiveCardType; options?: ChatWidgetQuickReplyOption[]; slots?: ChatWidgetAppointmentSlot[]; meetingTypes?: ChatWidgetMeetingTypeOption[]; confirmedSlot?: ChatWidgetAppointmentSlot; meetingType?: ChatWidgetMeetingTypeId; topic?: string; advisorName?: string; } interface ChatWidgetInteractiveCardProps extends ChatWidgetInteractiveCardData { onQuickReply?: (optionId: string) => void; onSlotSelect?: (slotId: string) => void; onMeetingTypeSelect?: (typeId: ChatWidgetMeetingTypeId) => void; className?: string; } declare function ChatWidgetInteractiveCard({ type, options, onQuickReply, slots, onSlotSelect, meetingTypes, onMeetingTypeSelect, confirmedSlot, meetingType, topic, advisorName, className, }: ChatWidgetInteractiveCardProps): react_jsx_runtime.JSX.Element | null; interface ChatWidgetWindowProps { isOpen: boolean; brokerName?: string; /** * Solid brand color (hex) — sets `--primary` on the widget so all interactive * elements match, plus a contrast-safe `--primary-foreground` so text stays * readable on light colors. Omit to inherit the tenant color from ThemeProvider. */ brandColor?: string; gradientFrom?: string; gradientTo?: string; onMinimize?: () => void; onIntakeSubmit?: (user: ChatWidgetUser) => void; isSubmittingIntake?: boolean; topics?: ChatWidgetTopic[]; onTopicSelect?: (topicId: string) => void; /** External booking URL. When provided and user selects "Book a Meeting", shows a booking screen instead of chat. */ bookingUrl?: string; messages?: ChatWidgetChatMessage[]; inputValue?: string; onInputChange?: (value: string) => void; onSend?: (value: string) => void; isStreaming?: boolean; onSlotSelect?: (slotId: string) => void; onQuickReply?: (optionId: string) => void; onMeetingTypeSelect?: (typeId: ChatWidgetMeetingTypeId) => void; /** Override starting screen — used in stories to skip to a specific screen. */ initialScreen?: ChatWidgetScreen; /** Override cached user — used in stories to pre-populate the user. */ initialUser?: ChatWidgetUser; className?: string; } declare function ChatWidgetWindow({ isOpen, brokerName, brandColor, gradientFrom, gradientTo, onMinimize, onIntakeSubmit, isSubmittingIntake, topics, onTopicSelect, bookingUrl, messages, inputValue, onInputChange, onSend, isStreaming, onSlotSelect, onQuickReply, onMeetingTypeSelect, initialScreen, initialUser, className, }: ChatWidgetWindowProps): react_jsx_runtime.JSX.Element | null; interface ChatWidgetProps { brokerName?: string; /** * Solid brand color (hex) applied to the FAB launcher and the whole window. * Omit to inherit the tenant color from ThemeProvider. */ brandColor?: string; gradientFrom?: string; gradientTo?: string; /** ID used to connect to the correct AI agent. */ agentId?: string; /** External booking URL. When provided, "Book a Meeting" shows a direct booking screen instead of chat. */ bookingUrl?: string; position?: "bottom-right" | "bottom-left"; /** Opens the widget by default — useful for stories. */ defaultOpen?: boolean; /** Callback when a topic is selected. */ onTopicSelected?: (topicId: string) => void; /** Callback when the user sends a message. */ onMessageSent?: (message: string) => void; } declare function ChatWidget({ brokerName, brandColor, gradientFrom, gradientTo, bookingUrl, position, defaultOpen, onTopicSelected, onMessageSent, }: ChatWidgetProps): react_jsx_runtime.JSX.Element; export { ChatWidget, type ChatWidgetAppointmentSlot, type ChatWidgetChatMessage, ChatWidgetIntakeForm, type ChatWidgetIntakeFormProps, ChatWidgetInteractiveCard, type ChatWidgetInteractiveCardData, type ChatWidgetInteractiveCardProps, type ChatWidgetInteractiveCardType, type ChatWidgetMeetingTypeId, type ChatWidgetMeetingTypeOption, type ChatWidgetProps, type ChatWidgetQuickReplyOption, type ChatWidgetScreen, type ChatWidgetTopic, ChatWidgetTopicCard, type ChatWidgetTopicCardProps, ChatWidgetTopicGrid, type ChatWidgetTopicGridProps, type ChatWidgetUser, ChatWidgetWindow, type ChatWidgetWindowProps, DEFAULT_CHAT_WIDGET_TOPICS };