export interface User {
  id: number
  username: string
  email: string
  is_active: boolean
  is_superuser: boolean
  can_use_local_model: boolean
  created_at: string
}

export interface LoginRequest {
  username: string
  password: string
}

export interface LoginResponse {
  access_token: string
  token_type: string
}

export interface AuthState {
  token: string | null
  user: User | null
  isLoading: boolean
  isAuthenticated: boolean
}

export interface PasswordChangeRequest {
  current_password: string
  new_password: string
  confirm_password: string
}

export interface UserPreferences {
  default_backend: 'local' | 'aliyun'
  onboarding_completed: boolean
  available_backends?: string[]
  language?: 'zh-CN' | 'zh-TW' | 'en-US' | 'ja-JP' | 'ko-KR'
}
