import { U as UserRole } from './enums-Dume-V5Y.js';

/**
 * Auth 模块类型定义
 * Auth Module Types
 */

/**
 * 用户基础信息（核心字段）
 * Base User Information
 */
interface BaseUser {
    id: string;
    email: string;
    username: string;
    role: UserRole;
}
/**
 * 扩展用户信息（可选字段）
 * Extended User Information
 */
interface User extends BaseUser {
    nickname?: string;
    avatar?: string;
    createdAt?: string;
    updatedAt?: string;
    [key: string]: any;
}
/**
 * 登录表单数据
 * Login Form Data
 */
interface LoginForm {
    email: string;
    password: string;
    rememberMe?: boolean;
}
/**
 * 注册表单数据
 * Register Form Data
 */
interface RegisterForm {
    email: string;
    username: string;
    password: string;
    confirmPassword?: string;
    nickname?: string;
}
/**
 * API 响应类型
 */
interface ApiResponse<T = any> {
    success: boolean;
    data?: T;
    error?: string;
    message?: string;
}
/**
 * 认证响应类型
 */
interface AuthResponse {
    user: User;
    token: string;
}
/**
 * API 客户端基础接口
 */
interface IAuthClient {
    isAuthenticated(): Promise<boolean>;
    getCurrentUser(): Promise<ApiResponse<User>>;
    login(email: string, password: string): Promise<ApiResponse<AuthResponse>>;
    register(email: string, password: string, username: string): Promise<ApiResponse<AuthResponse>>;
    logout(): Promise<void>;
    clearUserData(): Promise<void>;
}
/**
 * 认证操作结果接口
 */
interface AuthResult {
    success: boolean;
    error?: string;
}
/**
 * useAuth Hook 返回值接口
 */
interface UseAuthReturn {
    user: User | null;
    isLoggedIn: boolean;
    loading: boolean;
    checkingAuth: boolean;
    error: string | null;
    login: (email: string, password: string) => Promise<AuthResult>;
    register: (email: string, password: string, username: string) => Promise<AuthResult>;
    logout: () => Promise<void>;
    refresh: () => Promise<void>;
    clearError: () => void;
}

export type { AuthResponse as A, BaseUser as B, IAuthClient as I, LoginForm as L, RegisterForm as R, UseAuthReturn as U, User as a, ApiResponse as b, AuthResult as c };
