import { NormalizedAuthConfig, RedirectOptions } from '../types/config'; import { BetterAuthClientInstance } from '../types/better-auth-client'; import { ExtendedLabels } from './core/types'; export interface ManagedAuthUIInit { container: HTMLElement; labels?: Partial; config: NormalizedAuthConfig; authClient: BetterAuthClientInstance; onLogin?: (payload: any) => void; onError?: (err: any) => void; redirects?: RedirectOptions; /** 订阅 token 变化(用于跨窗口 token 同步) */ onAuthStateChange?: (listener: () => void) => () => void; } export declare class ManagedAuthUI { private container; private root; private labels; private config; private authClient; private flowManager; private viewFactory; private unsubscribe?; private onLogin?; private onError?; private redirects?; private lastState?; private onAuthStateChange?; private tokenUnsubscribe?; constructor(opts: ManagedAuthUIInit); render(): void; /** * 渲染视图 */ private renderView; /** * 更新倒计时显示(不重新渲染整个视图) */ private updateCountdownDisplay; /** * 处理动作 */ private handleAction; /** * 切换认证流程(公共 API) */ switchFlow(flow: "sign-in" | "sign-up" | "verify-email" | "verify-code" | "reset-password" | "set-new-password" | "change-password"): void; /** * 获取当前流程(公共 API) */ getCurrentFlow(): import('./core/types').AuthFlow; /** * 销毁组件 */ destroy(): void; private isCountdownOnlyChange; private shallowEqualStateExceptCountdown; private shallowEqual; }