import { ComponentType } from 'react'; import { AuthViewProps } from '../core/auth-plugin.js'; import { AuthUiView } from '../core/auth-view.js'; import { AthenaAuthUiOptions } from '../core/ui-options.js'; export interface AuthViewResolverPlugin { fallbackViews?: { auth?: { signIn?: ComponentType; }; }; viewPaths?: { auth?: Readonly>; }; views?: { auth?: Readonly>>; }; } export interface AuthViewResolverInput { emailAndPasswordEnabled?: boolean; path?: string; plugins: readonly AuthViewResolverPlugin[]; view?: AuthUiView; viewPaths: { auth: Readonly> & { signIn: string; }; }; } export type AuthViewResolution = { state: "missing"; } | { state: "redirecting"; view: AuthUiView; } | { component: ComponentType; state: "plugin"; usesSocialProps: true; } | { component: ComponentType; state: "fallback"; usesSocialProps: true; } | { component: ComponentType; state: "builtIn"; usesSocialProps: boolean; view: AuthUiView; } | { state: "unknown"; validViews: readonly string[]; view?: AuthUiView; }; export declare function resolveAuthView({ emailAndPasswordEnabled, path, plugins, view, viewPaths }: AuthViewResolverInput): AuthViewResolution; export interface UseAuthViewControllerInput { path?: string; ui?: AthenaAuthUiOptions; view?: AuthUiView; } export declare function useAuthViewController({ path, ui, view }: UseAuthViewControllerInput): AuthViewResolution;