import { ConversationEntry, ConversationProvider } from '../libs/conversation/src/index.ts'; import { Auth, StorageService, TextsService } from '../libs/core/src/index.ts'; import { AuthCardState } from './types'; export declare class ChatProvider extends ConversationProvider { private headerMenuService; private videoService; private dialogService; private authService; private botChannel?; private botErrorCardEntry?; private botErrorCardTimer?; private botAgent?; private isBotPhase; private isLiveAgentChatActive; readonly storageService: StorageService; readonly textsService: TextsService; readonly auth: Auth; readonly isThirdPartyWidget: boolean; readonly headerComponent: any; private readonly application; private readonly survey; private readonly live; private readonly agent; private readonly user; private readonly params; private readonly invitationUid; private readonly customerName; private readonly pendingMessages; private readonly disconnected$; private isDisconnecting; private readonly onBeforeUnload; private engine?; private agentUsername; private sessionId; private contactId; private errand; private entrance; private conversationOptions; private _conversationOption; private botChannelSettings; private botEntries; private userEntries; private _savedBotAuthConfig?; idHubIframe?: HTMLIFrameElement; idHubIframeReady: boolean; idHubRequestId: number; idHubPendingRequests: Map void; reject: (reason: any) => void; }>; idHubCollectCancelled: boolean; idHubCancelInProgress: boolean; get conversationOption(): any; set conversationOption(val: any); get inVideoCall(): boolean; get inBotPhase(): boolean; updateHeaderOption(): void; showTunnistusAuthCard(state: AuthCardState, tunnistusURL?: string, errorMessage?: string, isAuthenticating?: boolean): ConversationEntry; showBankIdAuthCard(state: AuthCardState, qrCode?: string, autoStartToken?: string, wasQrScanned?: boolean, isMobile?: boolean): ConversationEntry; showAuthSetupCard(state: AuthCardState): ConversationEntry; getChatStatus(): Promise<"finished" | "noSession" | "active" | undefined>; sendAuthToken(authToken: string): Promise; setUserName(name: string): void; sendBotAuthResult(status: 'AUTHENTICATION_CANCELLED' | 'AUTHENTICATION_ERROR', errorMessage?: string): void; private restoreBotAuthConfig; constructor(name: string, component: any); private initializeServices; connect(conversationOptions?: Record): void; disconnected(): void; onUserSubmit(action: { text: string; }): void; save(data: any): void; rehydrate(data: Record): Promise; static getInstance(key: string, component: any): ChatProvider; private createEngineConfig; private initializeChat; /** * Initialize live agent chat with entrance check and auth/welcome form. * Called directly when bot channel is disabled, or after bot handover. */ private initializeLiveAgentChat; setupAuthenticationListeners(): void; handleWelcomeForm(idhubEIDToken?: string): Promise; private startChat; private startBotChannel; /** * Handles an eID authentication request from the virtual agent. * Overrides the auth config with values from the message and runs the IDHub auth flow * in the banner. The original config is restored once the result is sent back to the * bot via sendBotAuthResult / sendAuthToken. */ private handleBotAuthenticationRequest; /** * Handles the transition from bot to live agent. * Disconnects the bot channel and shows auth/welcome form for ACE Chat with live agent. */ private handleBotHandover; /** * Starts the live agent chat (original startChat logic). * This is called either directly or after bot handover. */ private startLiveAgentChat; restartNewChat(): void; private handleChatEngineError; private handleBotConnectionError; private resetChatState; private setQueueStatus; endConversation(): Promise; private sendConversationEmail; private clearPendingMessages; setSessionId(id: string | null): void; private isEntranceOpen; private unescapeHtml; private readonly onQueueStatusReceived; private readonly onEstablished; private readonly onPrepareVideo; private readonly onVideoPrepared; private readonly onChatButtonClicked; private readonly onEndVideoButtonClicked; private readonly onPenStatusChange; private readonly onChatEnded; private printAgent; private printUser; private printBot; printSystem(text: string, timestamp?: number): ConversationEntry; showQuitConfirmDialog(): void; }