import { InputBlock } from '@typebot.io/blocks-inputs/schema'; import { StartTypebot, StartFrom } from '@typebot.io/chat-api/schemas'; import { LogInSession } from '@typebot.io/logs/schemas'; import { Font } from '@typebot.io/theme/schemas'; type BubbleParams = { theme?: BubbleTheme; previewMessage?: PreviewMessageParams; autoShowDelay?: number; }; type BubbleTheme = { chatWindow?: ChatWindowTheme; button?: ButtonTheme; previewMessage?: PreviewMessageTheme; placement?: "left" | "right"; position?: "fixed" | "static"; }; type ChatWindowTheme = { backgroundColor?: string; maxWidth?: string; maxHeight?: string; }; type ButtonTheme = { isHidden?: boolean; size?: "medium" | "large" | `${number}px`; backgroundColor?: string; iconColor?: string; customIconSrc?: string; customCloseIconSrc?: string; }; type PreviewMessageParams = { avatarUrl?: string; message: string; autoShowDelay?: number; }; type PreviewMessageTheme = { backgroundColor?: string; textColor?: string; closeButtonBackgroundColor?: string; closeButtonIconColor?: string; }; type CommandArgs = { id?: string; }; type CommandData = CommandArgs & { isFromTypebot: boolean; } & ({ command: "open" | "toggle" | "close" | "hidePreviewMessage" | "unmount" | "reload"; } | ShowMessageCommandData | SetPrefilledVariablesCommandData | SetInputValueCommandData | SendCommandCommandData); type ShowMessageCommandData = { command: "showPreviewMessage"; message?: Pick; }; type SetPrefilledVariablesCommandData = { command: "setPrefilledVariables"; variables: Record; }; type SetInputValueCommandData = { command: "setInputValue"; value: string; }; type SendCommandCommandData = { command: "sendCommand"; text: string; }; declare const close: ({ id }?: CommandArgs) => void; declare const open: ({ id }?: CommandArgs) => void; declare const showPreviewMessage: (proactiveMessage: ShowMessageCommandData["message"] | undefined, { id }?: CommandArgs) => void; declare const toggle: ({ id }?: CommandArgs) => void; declare const setInputValue: (value: string, { id }?: CommandArgs) => void; declare const unmount: ({ id }?: CommandArgs) => void; declare const setPrefilledVariables: (variables: Record, { id }?: CommandArgs) => void; declare const hidePreviewMessage: ({ id }?: CommandArgs) => void; declare const sendCommand: (text: string, { id }?: CommandArgs) => void; declare const reload: ({ id }?: CommandArgs) => void; type BotProps = { id?: string; typebot: string | StartTypebot | undefined; isPreview?: boolean; resultId?: string; prefilledVariables?: Record; apiHost?: string; wsHost?: string; font?: Font; progressBarRef?: HTMLDivElement; startFrom?: StartFrom; sessionId?: string; onNewInputBlock?: (inputBlock: InputBlock) => void; onAnswer?: (answer: { message: string; blockId: string; }) => void; onInit?: () => void; onEnd?: () => void; onNewLogs?: (logs: LogInSession[]) => void; onChatStatePersisted?: (isEnabled: boolean) => void; onScriptExecutionSuccess?: (message: string) => void; }; type PopupParams = { autoShowDelay?: number; theme?: { width?: string; backgroundColor?: string; zIndex?: number; }; }; type PopupProps = BotProps & PopupParams & { defaultOpen?: boolean; isOpen?: boolean; onOpen?: () => void; onClose?: () => void; }; type BubbleProps = BotProps & BubbleParams & { inlineStyle?: { [key: string]: string; }; isOpen?: boolean; onOpen?: () => void; onClose?: () => void; onPreviewMessageClick?: () => void; onPreviewMessageDismissed?: () => void; }; declare const resolveButtonSize: (size: NonNullable["button"]>["size"], { isHidden }?: { isHidden?: boolean; }) => `${number}px`; export { type BotProps, type BubbleParams, type BubbleProps, type BubbleTheme, type ButtonTheme, type ChatWindowTheme, type CommandArgs, type CommandData, type PopupParams, type PopupProps, type PreviewMessageParams, type PreviewMessageTheme, type SendCommandCommandData, type SetInputValueCommandData, type SetPrefilledVariablesCommandData, type ShowMessageCommandData, close, hidePreviewMessage, open, reload, resolveButtonSize, sendCommand, setInputValue, setPrefilledVariables, showPreviewMessage, toggle, unmount };