import React__default from 'react';
import { H as HeadlessLoginFormProps, a as HeadlessRegisterFormProps } from '../../types-zK6kDzDQ.js';
export { B as BaseFormProps, L as LoginFormState, R as RegisterFormState } from '../../types-zK6kDzDQ.js';
import { BaseApiClient } from '../client/index.js';
import { a as User } from '../../types-CroexXnI.js';
import '../../types-BaZccpvk.js';
import '../../types-CbTsi9CZ.js';
import '../../enums-Dume-V5Y.js';
import 'drizzle-orm/pg-core';

/**
 * Auth Components - LoginForm (Headless)
 * 无样式的登录表单组件
 */

/**
 * Headless 登录表单组件
 *
 * 提供登录逻辑但不包含任何 UI 样式，
 * 使用 render props 模式让用户完全控制 UI
 *
 * @example
 * ```tsx
 * <LoginForm apiClient={apiClient}>
 *   {({ email, password, loading, error, handleEmailChange, handlePasswordChange, handleSubmit }) => (
 *     <form onSubmit={handleSubmit}>
 *       <input
 *         value={email}
 *         onChange={(e) => handleEmailChange(e.target.value)}
 *       />
 *       <input
 *         type="password"
 *         value={password}
 *         onChange={(e) => handlePasswordChange(e.target.value)}
 *       />
 *       {error && <div>{error}</div>}
 *       <button disabled={loading}>
 *         {loading ? '登录中...' : '登录'}
 *       </button>
 *     </form>
 *   )}
 * </LoginForm>
 * ```
 */
declare function LoginForm({ apiClient, onSuccess, onError, children }: HeadlessLoginFormProps): React__default.JSX.Element;

/**
 * Auth Components - RegisterForm (Headless)
 * 无样式的注册表单组件
 */

/**
 * Headless 注册表单组件
 *
 * 提供注册逻辑但不包含任何 UI 样式，
 * 使用 render props 模式让用户完全控制 UI
 *
 * @example
 * ```tsx
 * <RegisterForm apiClient={apiClient}>
 *   {({ email, password, username, loading, error, handleEmailChange, handlePasswordChange, handleUsernameChange, handleSubmit }) => (
 *     <form onSubmit={handleSubmit}>
 *       <input
 *         value={email}
 *         onChange={(e) => handleEmailChange(e.target.value)}
 *       />
 *       <input
 *         value={username}
 *         onChange={(e) => handleUsernameChange(e.target.value)}
 *       />
 *       <input
 *         type="password"
 *         value={password}
 *         onChange={(e) => handlePasswordChange(e.target.value)}
 *       />
 *       {error && <div>{error}</div>}
 *       <button disabled={loading}>
 *         {loading ? '注册中...' : '注册'}
 *       </button>
 *     </form>
 *   )}
 * </RegisterForm>
 * ```
 */
declare function RegisterForm({ apiClient, onSuccess, onError, children, }: HeadlessRegisterFormProps): React__default.JSX.Element;

/**
 * Admin Login Page Component
 * 完整的管理后台登录页面组件
 *
 * 功能：
 * - 邮箱密码登录
 * - 开发环境测试账户自动填充
 * - Analytics 埋点集成
 * - 角色权限检查
 * - 响应式设计
 */

interface AdminLoginPageProps {
    /**
     * API 客户端实例
     */
    apiClient: BaseApiClient;
    /**
     * 登录成功后的回调
     */
    onLoginSuccess?: (user: User) => void;
    /**
     * 登录失败的回调
     */
    onLoginError?: (error: string) => void;
    /**
     * 权限检查函数（可选）
     * 返回 true 表示有权限，false 表示无权限
     */
    checkPermission?: (user: User) => boolean;
    /**
     * 权限不足时的错误消息
     */
    permissionDeniedMessage?: string;
    /**
     * 开发环境配置
     */
    devConfig?: {
        /**
         * 是否启用开发模式功能（自动填充等）
         */
        enabled?: boolean;
        /**
         * 测试账户邮箱
         */
        testEmail?: string;
        /**
         * 测试账户密码
         */
        testPassword?: string;
        /**
         * 自动填充延迟（毫秒）
         */
        autoFillDelay?: number;
    };
    /**
     * 页面文本配置
     */
    texts?: {
        appName?: string;
        appDescription?: string;
        pageTitle?: string;
        pageSubtitle?: string;
        emailLabel?: string;
        emailPlaceholder?: string;
        passwordLabel?: string;
        passwordPlaceholder?: string;
        loginButton?: string;
        loggingInButton?: string;
        fillTestAccount?: string;
        copyCredentials?: string;
        devModeLabel?: string;
        testAccountInfo?: string;
        testAccountFilled?: string;
        footer?: string;
    };
    /**
     * Analytics 集成（可选）
     */
    analytics?: {
        /**
         * 页面访问埋点
         */
        trackPageView?: (data: Record<string, any>) => void;
        /**
         * 登录成功埋点
         */
        trackLoginSuccess?: (user: User) => void;
        /**
         * 登录失败埋点
         */
        trackLoginFailed?: (error: string, email: string) => void;
        /**
         * 权限拒绝埋点
         */
        trackPermissionDenied?: (user: User) => void;
        /**
         * 设置用户信息
         */
        setUser?: (user: {
            userId: string;
            email: string;
            role: string;
        }) => void;
    };
    /**
     * UI 组件（可选，用于自定义样式）
     */
    components?: {
        Container?: React__default.ComponentType<{
            children: React__default.ReactNode;
        }>;
        Card?: React__default.ComponentType<{
            children: React__default.ReactNode;
        }>;
        Input?: React__default.ComponentType<any>;
        Button?: React__default.ComponentType<any>;
        Alert?: React__default.ComponentType<{
            children: React__default.ReactNode;
        }>;
        Badge?: React__default.ComponentType<{
            children: React__default.ReactNode;
            variant?: string;
        }>;
    };
    /**
     * className 配置（用于 Tailwind CSS）
     */
    classNames?: {
        container?: string;
        card?: string;
        header?: string;
        form?: string;
        input?: string;
        button?: string;
        alert?: string;
    };
}
declare function AdminLoginPage(props: AdminLoginPageProps): React__default.JSX.Element;

export { AdminLoginPage, type AdminLoginPageProps, HeadlessLoginFormProps, HeadlessRegisterFormProps, LoginForm, RegisterForm };
