/**
 * 用户信息接口
 */
interface User {
    id: number;
    phone: string;
    name?: string | null;
    email?: string | null;
    role: string;
    isActive: boolean;
    lastLoginAt?: Date | null;
    createdAt: Date;
    updatedAt: Date;
}
/**
 * 用户会话接口
 */
interface UserSession {
    id: number;
    userId: number;
    sessionToken: string;
    expiresAt: Date;
    createdAt: Date;
}
/**
 * 登录请求接口
 */
interface LoginRequest {
    phone: string;
    password: string;
}
/**
 * 注册请求接口
 */
interface RegisterRequest {
    phone: string;
    password: string;
    name?: string;
}
/**
 * 登录响应接口
 */
interface LoginResponse {
    success: boolean;
    message: string;
    user?: User;
    sessionToken?: string;
}
/**
 * 注册响应接口
 */
interface RegisterResponse {
    success: boolean;
    message: string;
    user?: User;
    sessionToken?: string;
}
/**
 * 会话验证响应接口
 */
interface SessionValidationResponse {
    valid: boolean;
    user?: User;
    message?: string;
}
/**
 * 会话验证结果接口
 */
interface SessionValidation {
    valid: boolean;
    user?: User;
}
/**
 * 登录模态框Props
 */
interface LoginModalProps {
    isOpen: boolean;
    onClose: () => void;
    onSuccess: () => void;
    onSwitchToRegister?: () => void;
}
/**
 * 注册模态框Props
 */
interface RegisterModalProps {
    isOpen: boolean;
    onClose: () => void;
    onSuccess: () => void;
    onSwitchToLogin?: () => void;
}
/**
 * 认证守卫Props
 */
interface AuthGuardProps {
    children: React.ReactNode;
    fallback?: React.ReactNode;
    requireAuth?: boolean;
}
/**
 * 自定义菜单项接口
 */
interface CustomMenuItem {
    id: string;
    label: string;
    icon?: React.ComponentType<any>;
    onClick: () => void;
    requireAuth?: boolean;
}
/**
 * 用户菜单Props
 */
interface UserMenuProps {
    customMenuItems?: CustomMenuItem[];
    className?: string;
}
/**
 * 忘记密码模态框Props
 */
interface ForgotPasswordModalProps {
    isOpen: boolean;
    onClose: () => void;
    onSuccess: () => void;
}
/**
 * useAuth Hook返回值类型
 */
interface UseAuthReturn {
    user: User | null;
    loading: boolean;
    isAuthenticated: boolean;
    login: (credentials: LoginRequest) => Promise<{
        success: boolean;
        user?: User;
        message?: string;
    }>;
    register: (userData: RegisterRequest) => Promise<{
        success: boolean;
        user?: User;
        message?: string;
    }>;
    logout: () => Promise<void>;
    refreshUser: () => void;
}
/**
 * 认证服务接口
 */
interface AuthService {
    verifyPassword(phone: string, password: string): Promise<User | null>;
    createUser(phone: string, password: string, name?: string): Promise<User>;
    createSession(userId: number): Promise<UserSession>;
    validateSession(sessionToken: string): Promise<SessionValidation>;
    deleteSession(sessionToken: string): Promise<void>;
    deleteUserSessions(userId: number): Promise<void>;
    updateLastLogin(userId: number): Promise<void>;
    cleanupExpiredSessions(): Promise<void>;
    getUserByPhone(phone: string): Promise<User | null>;
    sendVerificationCode(phone: string): Promise<string>;
    verifyCode(phone: string, code: string): Promise<boolean>;
    resetPassword(phone: string, newPassword: string): Promise<void>;
    cleanupExpiredVerificationCodes(): Promise<void>;
}
/**
 * API权限验证函数类型
 */
type ValidateApiAuth = (request: Request) => Promise<User | null>;
/**
 * 用户角色枚举
 */
declare enum UserRole {
    USER = "user",
    ADMIN = "admin"
}
/**
 * 会话配置
 */
interface SessionConfig {
    maxAge: number;
    cookieName: string;
    secure: boolean;
    httpOnly: boolean;
    sameSite: 'strict' | 'lax' | 'none';
}

export { type AuthGuardProps as A, type CustomMenuItem as C, type ForgotPasswordModalProps as F, type LoginRequest as L, type RegisterRequest as R, type SessionValidationResponse as S, type User as U, type ValidateApiAuth as V, type UserSession as a, type LoginResponse as b, type RegisterResponse as c, type SessionValidation as d, type LoginModalProps as e, type RegisterModalProps as f, type UserMenuProps as g, type UseAuthReturn as h, type AuthService as i, UserRole as j, type SessionConfig as k };
