import { ComponentType } from 'react'; declare interface Animation_2 { enabled?: boolean; duration?: number; type?: 'ease' | 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out'; } declare interface BrowseConfig { referer?: string; referrer?: string; url?: string; title?: string; [key: string]: string | number | undefined; } declare interface BubbleConfig { show?: boolean; icon?: string; title?: string; subtitle?: string; messages?: BubbleMessageItem[]; autoRotate?: boolean; rotateInterval?: number; switchMode?: BubbleSwitchMode; } declare interface BubbleMessageItem { icon?: string; title?: string; subtitle?: string; } declare type BubbleSwitchMode = 'fade' | 'slide-up' | 'ticker'; declare interface ButtonConfig { show?: boolean; icon?: string; text?: string; width?: number; height?: number; action?: 'chat' | 'thread' | 'webrtc' | 'call' | 'ticket'; previewImageUrl?: string; previewImageAlt?: string; onClick?: () => void; } declare interface BytedeskConfig { isDebug?: boolean; forceRefresh?: boolean; mode?: 'floating' | 'inline'; container?: string | HTMLElement; inlineConfig?: { autoShow?: boolean; showBubble?: boolean; mode?: 'container' | 'fixed-right'; width?: number; zIndex?: number; offsetTop?: number; offsetBottom?: number; }; apiUrl?: string; htmlUrl?: string; embedUrl?: string; chatPath?: string; threadPath?: string; webrtcPath?: string; callPath?: string; ticketPath?: string; placement?: 'bottom-left' | 'bottom-right'; marginBottom?: number; marginSide?: number; autoPopup?: boolean; autoPopupDelay?: number; draggable?: boolean; locale?: string; /** * 是否在 ChatHeader 显示“切换显示模式”按钮(弹窗 <-> 嵌入页面右侧)。 * 默认 false(不显示)。设为 true 可显示该按钮。 * 仅在嵌入宿主(window.parent !== window)时生效。 */ showToggleViewModeButton?: boolean; inviteConfig?: InviteConfig; tabsConfig?: TabsConfig; bubbleConfig?: BubbleConfig; buttonConfig?: ButtonConfig; buttonsConfig?: ButtonConfig[]; feedbackConfig?: FeedbackConfig; chatConfig?: ChatConfig; browseConfig?: BrowseConfig; animation?: Animation_2; window?: WindowConfig; minimizedBarConfig?: MinimizedBarConfig; theme?: Theme; onInit?: () => void; onShowChat?: () => void; onHideChat?: () => void; onMessage?: (message: string, type: string) => void; onMessageBubbleClick?: (event: MessageBubbleClickEvent) => void; onConfigChange?: (config: BytedeskConfig) => void; onVisitorInfo?: (uid: string, visitorUid: string) => void; /** * 切换显示模式回调(弹窗 <-> 嵌入页面右侧)。 * 当 iframe 内 ChatHeader 点击切换按钮时触发。 * 若宿主(如 React/Vue 适配器)提供了该回调,SDK 将把切换交由宿主处理 *(例如通过 remount 实例切换);未提供时 SDK 内部自行重建 UI。 * nextMode: 'floating' | 'inline' */ onToggleViewMode?: (nextMode: 'floating' | 'inline') => void; } export declare const BytedeskNextjs: ComponentType; declare interface BytedeskNextjsProps extends BytedeskConfig { onInit?: () => void; } declare interface ChatConfig { org: string; t: string; sid: string; title?: string; uid?: string; visitorUid?: string; nickname?: string; avatar?: string; mobile?: string; email?: string; note?: string; channel?: string; goodsInfo?: string; orderInfo?: string; extra?: string; vipLevel?: string; debug?: boolean; draft?: boolean; settingsUid?: string; loadHistory?: boolean; threadDetail?: string | boolean; visitorProfile?: string | boolean; [key: string]: string | number | boolean | undefined; } declare interface FeedbackConfig { enabled?: boolean; trigger?: 'selection' | 'button' | 'both'; showOnSelection?: boolean; selectionText?: string; askAiText?: string; buttonText?: string; dialogTitle?: string; placeholder?: string; submitText?: string; cancelText?: string; successMessage?: string; categoryNames?: string[]; requiredTypes?: boolean; typesSectionTitle?: string; typesDescription?: string; submitScreenshot?: boolean; onSubmit?: (feedback: FeedbackData) => void; onCancel?: () => void; onAskAi?: (selectedText: string) => void; } declare interface FeedbackData { selectedText: string; images?: string[]; content: string; categoryNames?: string; url: string; title: string; userAgent: string; visitorUid?: string; orgUid?: string; } declare interface InviteConfig { show?: boolean; text?: string; icon?: string; delay?: number; loop?: boolean; loopDelay?: number; loopCount?: number; acceptText?: string; rejectText?: string; onAccept?: () => void; onReject?: () => void; onClose?: () => void; onOpen?: () => void; } declare interface MessageBubbleClickEvent { uid?: string; type?: string; content?: unknown; navigateToPath?: string | null; extra?: unknown; position?: string; status?: string; } declare interface MinimizedBarConfig { text?: string; } declare interface TabsConfig { messages?: boolean; thread?: boolean; help?: boolean; } declare interface Theme { mode?: 'light' | 'dark' | 'system'; textColor?: string; backgroundColor?: string; } declare interface WindowConfig { width?: number; height?: number; } export { }