import { Component, TypeDefs } from 'intact-vue'; import type { Events } from '../types'; import type { BubbleProps } from '../bubble'; export type BubbleListKey = string | number; export interface BubbleListRoleConfig extends Partial { className?: string; style?: any; onTyping?: (renderedContent: string, currentContent: string, item: BubbleListItem, index: number) => void; onTypingComplete?: (content: string, item: BubbleListItem, index: number) => void; } export interface BubbleListItem extends Partial { key?: BubbleListKey; role?: string; className?: string; style?: any; onTyping?: BubbleListRoleConfig['onTyping']; onTypingComplete?: BubbleListRoleConfig['onTypingComplete']; [key: string]: any; } export type BubbleListRoleMap = Record BubbleListRoleConfig)>; export interface BubbleListProps { items?: BubbleListItem[]; itemKey?: string | ((item: BubbleListItem, index: number) => BubbleListKey); autoScroll?: boolean; autoScrollThreshold?: number; maxHeight?: number | string; historyTriggerOffset?: number; hasMoreHistory?: boolean; loadingHistory?: boolean; roles?: BubbleListRoleMap; scrollBehavior?: 'auto' | 'smooth'; showScrollToBottom?: boolean; } export interface BubbleListSlotParams { item: BubbleListItem; mergedItem: BubbleListItem; index: number; key: BubbleListKey; isFirst: boolean; isLast: boolean; isAtBottom: boolean; } export interface HistoryLoadingSlotParams { loadingHistory: boolean; hasMoreHistory: boolean; } export interface ScrollToBottomSlotParams { isAtBottom: boolean; scrollToBottom: () => void; } export interface BubbleListEvents { loadHistory: []; scroll: [Event]; scrollBottomChange: [boolean]; autoScrollChange: [boolean]; typing: [BubbleListItem, string, string, number]; typingComplete: [BubbleListItem, string, number]; } export interface BubbleListBlocks { header: null; listFooter: null; empty: null; historyLoading: HistoryLoadingSlotParams; scrollToBottom: ScrollToBottomSlotParams; item: BubbleListSlotParams; avatar: BubbleListSlotParams; roleName: BubbleListSlotParams; beforeContent: BubbleListSlotParams; attachments: BubbleListSlotParams; content: BubbleListSlotParams; bottom: BubbleListSlotParams; loading: BubbleListSlotParams; footer: BubbleListSlotParams; extra: BubbleListSlotParams; } export declare class BubbleList extends Component { static template: string | import('intact-vue').Template; static typeDefs: Required>; static defaults: () => Partial; static events: Events; private config; private bubbleList; scrollToBottom(behavior?: ScrollBehavior): void; scrollToTop(behavior?: ScrollBehavior): void; scrollToKey(key: BubbleListKey, behavior?: ScrollBehavior): void; isAtBottom(): boolean; }