import { AuthState } from '../../libs/core/src/index.ts'; import { ChatProvider } from '../provider'; export declare class AuthService { private provider; private _authResult?; private _authenticationCardEntry; private _renderInBanner; private _bankIdAuthCardComponent?; private readonly idHubOrigin; private _boundIdHubMessageHandler; constructor(provider: ChatProvider); private subscribeToBankIdComponent; private createTunnistusEntry; private createBankIdEntry; /** * Agent-initiated authentication: runs the full auth flow with the card * rendered in the auth-banner area instead of the conversation feed. * The chat input remains unlocked throughout. */ initializeAuthFlowInBanner(): Promise; /** * Initialises ID Hub and starts the authentication flow. * Shows a loading card after 400 ms if setup is still in progress, * and transitions to an error card with a retry button on failure. */ initializeAuthFlow(): Promise; private cleanupIdHubIframe; setupIDHubAuth(): Promise; startAuthenticationFlow(isRetry?: boolean, skipAuthFetch?: boolean): Promise; handleTunnistusAuthentication(): Promise; private updateBankIdAuthCard; handleBankIdAuthentication(): Promise; endAuthenticatedSession(): Promise; resetAuthState(authState: AuthState.NonAuthenticated | AuthState.ChatEnded): void; private getAuthResult; /** * Variant of getAuthResult used exclusively by initializeAuthFlow. * Throws on failure instead of showing the error card itself, so that * initializeAuthFlow's catch block can handle spinner + error display. */ private getInitialAuthResult; /** * Shows the SetupError card with a retry button that restarts the full auth * flow. Used when getAuthResult fails — both on initial load and mid-flow. */ private showSetupErrorWithRetry; private isValidIdHubMessage; private handleIdHubIframeMessage; private sendToIdHubIframe; private mapIdHubStatus; private cancelIdHubAuth; private collectIdHubAuth; private collectIdHubAuthWithQR; }