/**
 * 认证翻译 - 英文
 * Authentication Translations - English
 */
import { AuthTranslations } from './zh';
import { brand } from '@/lib/brand';

export const authEn: AuthTranslations = {
  // Login
  login: {
    title: 'Login',
    subtitle: 'Welcome Back',
    brandName: brand.brandName,
    tagline: brand.taglineEn,
    slogan: brand.slogan,
    username: 'Email',
    usernamePlaceholder: 'Enter your email address',
    password: 'Password',
    passwordPlaceholder: 'Enter your password',
    rememberMe: 'Remember Me',
    forgotPassword: 'Forgot Password?',
    loginButton: 'Login',
    processing: 'Processing...',
    loggingIn: 'Logging in...',
    noAccount: "Don't have an account?",
    signUp: 'Sign Up',
    
    // Validation messages
    usernameRequired: 'Username is required',
    passwordRequired: 'Password is required',
    invalidCredentials: 'Invalid username or password',
    loginSuccess: 'Login successful',
    loginFailed: 'Login failed',
    devEmailLoginTitle: 'Dev Email Login',
    devEmailPlaceholder: 'Enter test mailbox',
    devEmailLoginButton: 'Login by Email',
    devEmailRequired: 'Please input test mailbox',
  },

  // SSO (v2.4: Entra ID OIDC sign-in)
  sso: {
    button: {
      microsoft: 'Sign in with Microsoft',
      password: 'Sign in with password',  // kept for compatibility (unused after v2.4 UI flip)
      or: 'or',
    },
    status: {
      redirecting: 'Redirecting to Microsoft sign-in...',
      completing: 'Completing sign-in...',
    },
    error: {
      domainNotAllowed:
        'Your email domain is not authorized for SSO sign-in. Contact IT or use password sign-in.',
      tokenInvalid: 'SSO verification failed. Please try again.',
      emailMissing: 'Your Microsoft account is missing an email. Contact IT.',
      bindingConflict: 'SSO binding conflict. Contact itadmin.',
      providerUnavailable: 'Microsoft sign-in unavailable. Please use password sign-in.',
      userCancelled: 'You cancelled Microsoft sign-in.',
      consentRequired: 'Microsoft requires re-consent. Please sign in again.',
      providerRejected: 'Microsoft sign-in was rejected. Contact IT.',
      iamUserSuspended: 'Your account is suspended. Contact your administrator.',
      fallback: 'Login failed. Please try again.',
    },
  },
  
  // Register
  register: {
    title: 'Register',
    subtitle: 'Create Your Account',
    username: 'Username',
    usernamePlaceholder: 'Enter username',
    email: 'Email',
    emailPlaceholder: 'Enter email address',
    password: 'Password',
    passwordPlaceholder: 'Enter password',
    confirmPassword: 'Confirm Password',
    confirmPasswordPlaceholder: 'Enter password again',
    registerButton: 'Register',
    registering: 'Registering...',
    haveAccount: 'Already have an account?',
    signIn: 'Sign In',
    
    // Validation messages
    usernameRequired: 'Username is required',
    usernameTooShort: 'Username must be at least 3 characters',
    emailRequired: 'Email is required',
    emailInvalid: 'Invalid email format',
    passwordRequired: 'Password is required',
    passwordTooShort: 'Password must be at least 6 characters',
    confirmPasswordRequired: 'Please confirm password',
    passwordsNotMatch: 'Passwords do not match',
    registerSuccess: 'Registration successful',
    registerFailed: 'Registration failed',
  },
  
  // Forgot password
  forgotPassword: {
    title: 'Forgot Password',
    subtitle: 'Reset Your Password',
    email: 'Email',
    emailPlaceholder: 'Enter your email',
    sendButton: 'Send Reset Link',
    sending: 'Sending...',
    backToLogin: 'Back to Login',
    
    // Validation messages
    emailRequired: 'Email is required',
    emailInvalid: 'Invalid email format',
    sendSuccess: 'Reset link sent to your email',
    sendFailed: 'Failed to send',
  },
  
  // Reset password
  resetPassword: {
    title: 'Reset Password',
    subtitle: 'Set New Password',
    newPassword: 'New Password',
    newPasswordPlaceholder: 'Enter new password',
    confirmPassword: 'Confirm Password',
    confirmPasswordPlaceholder: 'Enter new password again',
    resetButton: 'Reset Password',
    resetting: 'Resetting...',
    
    // Validation messages
    passwordRequired: 'New password is required',
    passwordTooShort: 'Password must be at least 6 characters',
    confirmPasswordRequired: 'Please confirm new password',
    passwordsNotMatch: 'Passwords do not match',
    resetSuccess: 'Password reset successful',
    resetFailed: 'Password reset failed',
  },
  
  // Others
  or: 'or',
  continue: 'Continue',
  cancel: 'Cancel',
};
