import { t as Manager } from "./Manager-CQQ99QOI.js"; import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js"; import { n as FaceCaptureManagerState, t as FaceCaptureManager, v as AuthenticationActor, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-BxWPpxyd.js"; //#region src/modules/authentication/authenticationManager.d.ts type AuthenticationState = FaceCaptureManagerState; /** * Wraps an authentication actor in a face-capture manager. * * `visibilityObserver` is an optional override escape-hatch — first-party * callers omit it and the downstream factory defaults to * `BrowserVisibilityObserverProvider`. Pass a custom or no-op observer to * disable `background`/`foreground` tracking or to run in a non-DOM * environment (e.g. SSR / tests). */ declare function createAuthenticationManagerFromActor(actor: AuthenticationActor, visibilityObserver?: IVisibilityObserverCapability): Manager & { load(): void; nextStep(): Promise; requestPermission(): void; goToLearnMore(): void; back(): void; close(): void; reset(): void; retryCapture(): void; capture(): void; }; /** * Creates an authentication manager instance for handling face authentication flow. * * The authentication manager provides: * - State management with statuses: `idle`, `loading`, `tutorial`, `permissions`, `capture`, `finished`, `closed`, `error` * - Permission handling with nested states: `idle`, `requesting`, `denied`, `learnMore` * - Capture handling with nested states: `initializing`, `startingRecorder`, `recordingActive`, `detecting`, `capturing`, `uploading`, `uploadError`, `success` * - Camera stream access when in `capture` state * - Detection status feedback during face detection * - Attempt tracking with `attemptsRemaining` * * @param options - Configuration for the authentication actor * @param options.config - The authentication module configuration from the flow * @param options.authHint - Hint for identifying the user (e.g., phone number, email) * @returns A manager instance with state subscription, API methods, and lifecycle controls * * @example * ```ts * const authManager = createAuthenticationManager({ * config: authConfig, * authHint: 'user@example.com' * }); * * authManager.subscribe((state) => { * if (state.status === 'capture') { * console.log('Camera ready:', state.stream); * console.log('Detection status:', state.detectionStatus); * } * if (state.status === 'finished') { * console.log('Authentication successful!'); * } * }); * * authManager.load(); * ``` */ declare function createAuthenticationManager(options: CreateAuthenticationActorOptions): Manager & { load(): void; nextStep(): Promise; requestPermission(): void; goToLearnMore(): void; back(): void; close(): void; reset(): void; retryCapture(): void; capture(): void; }; type AuthenticationManager = FaceCaptureManager; //#endregion export { createAuthenticationManagerFromActor as i, AuthenticationState as n, createAuthenticationManager as r, AuthenticationManager as t };