import React from 'react';
import { AuthMethodType, LoginFormData, RegisterFormData, LegalTermsConfig } from './shared/types';
/** 认证配置 - 基于用户提供的JSON配置结构 */
export interface AuthConfig {
    /** 认证配置 */
    auth: {
        /** 认证模式 */
        mode: 'custom';
        /** 认证方法配置 */
        method: {
            /** 手机认证配置 */
            phone?: {
                sort: number;
                enabled: boolean;
                setting: {
                    register_enabled: boolean;
                    register_method: 'code';
                    login_method: {
                        password?: {
                            enabled: boolean;
                            sort: number;
                        };
                        code?: {
                            enabled: boolean;
                            sort: number;
                        };
                    };
                };
            };
            /** 邮箱认证配置 */
            email?: {
                sort: number;
                enabled: boolean;
                setting: {
                    register_enabled: boolean;
                    register_method: 'code' | 'link';
                    login_method: {
                        password?: {
                            enabled: boolean;
                            sort: number;
                        };
                        link?: {
                            enabled: boolean;
                            sort: number;
                        };
                        code?: {
                            enabled: boolean;
                            sort: number;
                        };
                    };
                };
            };
            /** Facebook 认证配置 */
            facebook?: {
                sort: number;
                enabled: boolean;
                setting: {
                    appid: string;
                };
            };
            /** Apple 认证配置 */
            apple?: {
                sort: number;
                enabled: boolean;
                setting: {
                    identifier: string;
                };
            };
            /** Google 认证配置 */
            google?: {
                sort: number;
                enabled: boolean;
                setting: {
                    clientId: string;
                };
            };
            /** Guest 登录配置 */
            guest?: {
                sort: number;
                enabled: boolean;
            };
        };
        password?: {
            min_length: 8;
            require_lowercase_letters: false;
            require_numbers: false;
            require_special_characters: false;
            require_uppercase_letters: false;
        };
    };
    /** 页面配置 */
    page: {
        /** 登录页配置 */
        login: {
            terms: LegalTermsConfig['terms'];
            same_as_register: boolean;
            background_image_url?: string | null;
        };
        /** 注册页配置 */
        register: {
            terms: LegalTermsConfig['terms'];
            background_image_url?: string | null;
        };
    };
    /** logo */
    logo: string | null;
    /** 是否邮箱链接注册 */
    isEmailLinkRegister: boolean;
    /** 是否是邮件链接修改密码 */
    isForGetPasswordLink: boolean;
    /** 邮箱链接注册url 上的编码 */
    linkCode: string;
}
/** AuthModal 组件事件 */
export interface AuthModalEvents {
    /** 登录成功回调 */
    onLoginSuccess?: (data: LoginFormData, method: AuthMethodType, channel?: string) => Promise<void> | void;
    /** 注册成功回调 */
    onRegisterSuccess?: (data: RegisterFormData, method: AuthMethodType, channel?: string) => Promise<void> | void;
    /** 三方登录回调 */
    onOAuthLogin?: (provider: 'google' | 'facebook' | 'apple', channel?: string) => Promise<void> | void;
    /** 发送验证码回调 */
    onSendVerificationCode?: (account: string, type: 'email' | 'phone', channel?: string) => Promise<void> | void;
    /** 忘记密码回调 */
    onForgotPassword?: (account: string, channel?: string) => Promise<void> | void;
    /** 邮件链接过期回调 */
    onEmailLinkExpired?: () => void;
    /** 错误处理回调 */
    onError?: (error: any, context?: {
        action: 'login' | 'register';
        method?: AuthMethodType;
        channel?: string;
    }) => void;
}
/** AuthModal 组件属性 */
export interface AuthModalProps {
}
/**
 * 认证模态框组件
 * 包装 Login2 和 Register2 组件，提供统一的配置接口和页面切换功能
 */
declare const AuthModal: React.FC<AuthModalProps>;
export default AuthModal;
