import * as react_jsx_runtime from 'react/jsx-runtime'; type AiConvStatus = "ai-active" | "manual" | "needs-attention" | "closed"; type AiConvMessageRole = "bot" | "visitor" | "advisor" | "system"; type AiConvFieldConfidence = "confirmed" | "estimated"; type AiConvFilterTab = "all" | "emails" | "ai-active" | "needs-attention" | "closed"; type AiConvMode = "ai" | "manual"; type AiConvChannel = "chat" | "email"; type AiConvChannelFilter = "all" | AiConvChannel; type AiConvMeetingType = "video" | "phone" | "in-person"; interface AiConvContact { id: string; name: string; email?: string; phone?: string; } interface AiConvAdvisor { id: string; name: string; initials: string; role?: string; } interface AiConvListItemData { id: string; contact: AiConvContact; status: AiConvStatus; lastMessage: string; lastMessageRole?: AiConvMessageRole; timestamp: string; unreadCount?: number; /** Assigned advisor display name. */ assignedTo?: string; /** * Conversation topic tag — e.g. "Buy a Home", "Refinance", "Investment". * Shown as a small secondary badge so the broker can categorise conversations * at a glance without opening each thread. */ topic?: string; /** Channel this conversation is using — "chat" (default) or "email". */ channel?: AiConvChannel; /** * Latest email subject for this conversation — shown as the row title by * the "row" list-item variant (Gmail-style embedded lists). */ subject?: string; } interface AiConvAttachment { id: string; name: string; /** Human-readable size, e.g. "248 KB". */ size: string; /** Download URL — omitted for attachments staged locally, not yet uploaded. */ url?: string; } interface AiConvMessage { id: string; role: AiConvMessageRole; content: string; /** Files attached to this message (email channel only). */ attachments?: AiConvAttachment[]; timestamp?: string; /** Display name shown above the bubble. */ senderName?: string; /** Email subject line — shown as a header in the bubble for email-channel messages. */ subject?: string; } interface AiConvDataField { label: string; value: string; confidence: AiConvFieldConfidence; } interface AiConvMeetingActionItem { label: string; done?: boolean; } interface AiConvAppointmentData { datetime: string; meetingType: AiConvMeetingType; /** Meeting link (video), phone number (phone), or address (in-person). */ meetingDetail?: string; status: "requested" | "confirmed" | "pending" | "cancelled"; /** AI recap of the meeting — shown once it has been recorded and summarised. */ summary?: string; /** Follow-up items from the meeting, optionally marked done. */ actionItems?: AiConvMeetingActionItem[]; } interface AiConvEmailPayload { content: string; to: string; cc: string; subject: string; /** `true` when composing a reply; `false` when composing a new email. */ isReply: boolean; /** Files attached before sending. */ attachments?: AiConvAttachment[]; } interface ChatComposerProps { mode: AiConvMode; /** Active reply channel. Defaults to "chat". */ channel?: AiConvChannel; onChannelChange?: (channel: AiConvChannel) => void; /** * When true, the Email tab is shown in the composer. Defaults to false — * consumers must opt in once their tenant's email integration is wired up. */ isEmailIntegrated?: boolean; /** * Locks the composer to the email channel: the Chat/Email toggle is hidden * and the chat panel never renders. For embedded email-only contexts (e.g. * the Kanban slide-out's Email & Notes tab). Implies email is integrated; * `channel` / `isEmailIntegrated` are ignored while set. Defaults to false. */ emailOnly?: boolean; /** Lead's email address — pre-fills the To field in email compose. */ contactEmail?: string; inputValue?: string; onInputChange?: (v: string) => void; /** Fired when the user sends a chat message. */ onSend?: (content: string) => void; /** Fired when the user sends an email. */ onSendEmail?: (payload: AiConvEmailPayload) => void; onTakeOver?: () => void; onLetAiHandle?: () => void; /** Called when the user selects files via the attachment button. */ onAttachFile?: (files: FileList) => void; /** Called when the user selects images via the image upload button. */ onAttachImage?: (files: FileList) => void; /** Pre-fills the Subject field with "Re: [emailReplySubject]" for email threads. */ emailReplySubject?: string; /** * Hides the "Reply / New email" toggle that otherwise shows whenever * `emailReplySubject` is set. For contexts with a dedicated "start a new * email" entry point elsewhere (e.g. the Kanban slide-out's Email & Notes * tab), so there's only one way to start a new thread. Defaults to false. */ hideEmailModeToggle?: boolean; className?: string; } declare function ChatComposer({ mode, channel: channelProp, onChannelChange, isEmailIntegrated, emailOnly, contactEmail, inputValue, onInputChange, onSend, onSendEmail, onTakeOver, onLetAiHandle, onAttachFile, onAttachImage, emailReplySubject, hideEmailModeToggle, className, }: ChatComposerProps): react_jsx_runtime.JSX.Element; interface ChatThreadProps { contact: AiConvContact; status: AiConvStatus; /** Hides the status chip next to the contact name — for threads with no real status yet (e.g. composing a brand-new email). */ hideStatusChip?: boolean; mode: AiConvMode; messages: AiConvMessage[]; isAiTyping?: boolean; /** Active reply channel — "chat" (default) or "email". */ channel?: AiConvChannel; onChannelChange?: (channel: AiConvChannel) => void; /** When true, the Email tab is shown in the composer. Defaults to false. */ isEmailIntegrated?: boolean; /** * Locks the thread to the email channel: the composer's Chat/Email toggle * is hidden and AI hand-off actions never show. For embedded email-only * contexts (e.g. the Kanban slide-out's Email & Notes tab). Implies email * is integrated; `channel` / `isEmailIntegrated` are ignored while set. */ emailOnly?: boolean; inputValue?: string; onInputChange?: (v: string) => void; /** Fired when the user sends a chat message. */ onSend?: (content: string) => void; /** Fired when the user sends an email. */ onSendEmail?: (payload: AiConvEmailPayload) => void; onTakeOver?: () => void; onLetAiHandle?: () => void; /** Called when the user selects files via the attachment button in the composer. */ onAttachFile?: (files: FileList) => void; /** Called when the user selects images via the image upload button in the composer. */ onAttachImage?: (files: FileList) => void; /** Pre-fills the email Subject field with "Re: [emailReplySubject]" for reply threads. */ emailReplySubject?: string; /** Hides the composer's "Reply / New email" toggle. See `ChatComposerProps`. Defaults to false. */ hideEmailModeToggle?: boolean; onReopen?: () => void; /** Marks an open conversation as resolved. Shows a "Mark as Closed" menu item when set. */ onClose?: () => void; onMarkUrgent?: () => void; onUnmarkUrgent?: () => void; onArchive?: () => void; onAssignToAdvisor?: () => void; /** True when older messages can be loaded (e.g. paginated history). */ hasMoreMessages?: boolean; /** True while a `onLoadMoreMessages` request is in-flight. */ isLoadingMoreMessages?: boolean; /** Fired when the consumer should fetch older messages. */ onLoadMoreMessages?: () => void; /** Back to conversation list. Renders on mobile only unless `showBackButton` is set. */ onBack?: () => void; /** * Show the back button at every breakpoint (default: mobile only). For * embedded drill-in layouts where the list and thread swap in place. */ showBackButton?: boolean; /** Mobile only — show lead info panel. */ onShowLeadInfo?: () => void; className?: string; } declare function ChatThread({ contact, status, hideStatusChip, mode, messages, isAiTyping, channel: channelProp, onChannelChange, isEmailIntegrated, emailOnly, inputValue, onInputChange, onSend, onSendEmail, onTakeOver, onLetAiHandle, onAttachFile, onAttachImage, emailReplySubject, hideEmailModeToggle, onReopen, onClose, onMarkUrgent, onUnmarkUrgent, onArchive, onAssignToAdvisor, hasMoreMessages, isLoadingMoreMessages, onLoadMoreMessages, onBack, showBackButton, onShowLeadInfo, className, }: ChatThreadProps): react_jsx_runtime.JSX.Element; export { type AiConvAdvisor as A, ChatComposer as C, type AiConvAppointmentData as a, type AiConvChannel as b, type AiConvChannelFilter as c, type AiConvContact as d, type AiConvDataField as e, type AiConvEmailPayload as f, type AiConvFieldConfidence as g, type AiConvFilterTab as h, type AiConvListItemData as i, type AiConvMeetingType as j, type AiConvMessage as k, type AiConvMessageRole as l, type AiConvMode as m, type AiConvStatus as n, type ChatComposerProps as o, ChatThread as p, type ChatThreadProps as q, type AiConvAttachment as r, type AiConvMeetingActionItem as s };