/**
 * 国际化配置文件
 * 支持多语言切换和动态加载
 */

export type Language = 'zh-CN' | 'en-US' | 'ja-JP' | 'ko-KR';

export interface I18nConfig {
  defaultLanguage: Language;
  fallbackLanguage: Language;
  supportedLanguages: Language[];
  storageKey: string;
}

export const i18nConfig: I18nConfig = {
  defaultLanguage: 'en-US',
  fallbackLanguage: 'en-US',
  supportedLanguages: ['en-US'],
  storageKey: 'app_language',
};

// 语言显示名称映射
export const languageNames: Record<Language, string> = {
  'zh-CN': '简体中文',
  'en-US': 'English',
  'ja-JP': '日本語',
  'ko-KR': '한국어',
};

// 语言资源类型定义
export interface LanguageResources {
  common: {
    confirm: string;
    cancel: string;
    ok: string;
    loading: string;
    retry: string;
    success: string;
    error: string;
    warning: string;
    tips: string;
    pleaseWait: string;
    networkError: string;
    unknownError: string;
    operationSuccess: string;
    operationFailed: string;
  };
  navigation: {
    playground: string;
    mine: string;
    history: string;
    home: string;
  };
  home: {
    title: string;
    loadTemplatesFailed: string;
    refreshSuccess: string;
    refreshFailed: string;
    imageAuditFailed: string;
    imageAuditNotPassed: string;
    imageContentNotCompliant: string;
    imageNeedsManualReview: string;
    imageAuditUncertain: string;
    imageAuditPassed: string;
    imageAuditFailedRetry: string;
    waitForTaskCompletion: string;
    userConfirmedAuditFailure: string;
  };
  friendsPhoto: {
    title: string;
    usageTips: string;
    usageTipsContent: string;
    iKnow: string;
    selectingImage: string;
    uploading: string;
    uploadSuccess: string;
    uploadFailed: string;
    needAlbumPermission: string;
    uploadTimeout: string;
    networkConnectionFailed: string;
    uploadFailedRetry: string;
    uploadTwoImages: string;
    aiGenerating: string;
    waitForTaskCompletion: string;
    firstPhoto: string;
    selectYourPhoto: string;
    secondPhoto: string;
    selectFriendPhoto: string;
    clickToChange: string;
    clickToUpload: string;
    friendsPhotoGeneration: string;
    uploadTwoPhotosDesc: string;
    photoPreview: string;
    confirmAndGenerate: string;
    photo1: string;
    photo2: string;
    generating: string;
    startGenerating: string;
  };
  loading: {
    aiGenerating: string;
    pleaseWaitDesc: string;
  };
  audit: {
    imageContentNotCompliant: string;
    imageNeedsManualReview: string;
    imageAuditUncertain: string;
    imageAuditPassed: string;
    imageAuditFailed: string;
    imageAuditNotPassed: string;
    iKnow: string;
  };
  history: {
    title: string;
    noRecords: string;
    loadFailed: string;
    processingFailed: string;
    notLoggedIn: string;
    loginToViewHistory: string;
    loginButton: string;
  };
}
