import { TranslationSchema } from '../types';

/**
 * English translations ??the DEFAULT and FALLBACK locale.
 * All keys MUST be present here. Other locales can omit keys to fallback to English.
 */
export const en: TranslationSchema = {
  // ?? Error Messages ??????????????????????????????????????
  errors: {
    E1001: {
      userMessage: 'The user limit value is invalid.',
      resolution: 'Please enter a number between 0 and 99. (0 = unlimited)',
    },
    E1002: {
      userMessage: 'The channel name format is invalid.',
      resolution: 'Please enter a valid channel name (max 100 characters).',
    },
    E1003: {
      userMessage: 'You cannot perform this action on yourself.',
    },
    E1004: {
      userMessage: 'The selected user is not in the voice channel.',
      resolution: 'Make sure the user is currently in the channel before performing this action.',
    },
    E2001: {
      userMessage: 'The bot does not have sufficient permissions to manage channels.',
      resolution: 'Please ask a server administrator to grant the bot "Manage Channels" permission.',
    },
    E2002: {
      userMessage: 'The bot does not have sufficient voice channel permissions.',
      resolution: 'Please ask a server administrator to grant the bot "Manage Channels", "Manage Roles", and "Move Members" permissions.',
    },
    E2003: {
      userMessage: 'You do not have permission to use this command.',
      resolution: 'This command requires Administrator permission.',
    },
    E2004: {
      userMessage: 'Only the channel owner can use these controls.',
    },
    E2005: {
      userMessage: 'You must be in your active temporary voice channel to use this.',
      resolution: 'Join your temporary voice channel and try again.',
    },
    E3001: {
      userMessage: 'An internal error occurred while processing your request.',
      resolution: 'Please try again in a moment. If the issue persists, contact the bot administrator.',
    },
    E3002: {
      userMessage: 'An internal error occurred while processing your request.',
      resolution: 'Please try again in a moment.',
    },
    E3003: {
      userMessage: 'An error occurred while executing this command.',
      resolution: 'Please try again. If the problem persists, contact the bot administrator.',
    },
    E3999: {
      userMessage: 'An unexpected error occurred.',
      resolution: 'Please try again later. If the problem continues, contact the bot administrator.',
    },
    E4001: {
      userMessage: 'The action was rate-limited by Discord.',
      resolution: 'Please wait a moment and try again.',
    },
    E4002: {
      userMessage: 'Discord denied the action due to insufficient permissions.',
      resolution: 'Please ask a server administrator to check the bot\'s role and channel permissions.',
    },
    E4003: {
      userMessage: 'A temporary issue occurred with Discord.',
      resolution: 'Please try again shortly. Check Discord\'s status at https://discordstatus.com if the issue persists.',
    },
  },

  // ?? Error Category Titles ???????????????????????????????
  errorTitles: {
    USER_INPUT: 'Please check your input',
    PERMISSION: 'Insufficient permissions',
    BOT_INTERNAL: 'Something went wrong',
    DISCORD_API: 'Temporary issue',
  },

  // ?? Error Embed Field Labels ????????????????????????????
  errorFields: {
    resolution: '💡 How to resolve',
  },

  // ?? Voice Channel ???????????????????????????????????????
  voice: {
    channelReady: '{{owner}}, your temporary channel is ready! Use the dropdown menu below to manage it.',
    defaultRoomName: "{{username}}'s Room",
    controlPanel: {
      placeholder: '?숋툘 Manage Channel Settings',
      rename: 'Rename Channel',
      limit: 'Set User Limit',
      lock: 'Lock / Unlock',
      kick: 'Kick User',
      ban: 'Ban / Hide User',
      transfer: 'Transfer Ownership',
    },
    responses: {
      channelLocked: 'Channel Locked! Only you and invited members can join.',
      channelUnlocked: 'Channel Unlocked! Anyone can join now.',
      channelRenamed: 'Channel renamed to **{{name}}**!',
      limitSet: 'Channel limit set to **{{limit}}**!',
      limitUnlimited: 'Unlimited',
      kicked: 'Kicked {{user}} from the channel.',
      banned: 'Banned and hidden channel from {{user}}.',
      transferPrompt: 'Select who will become the new owner of this channel.',
      transferDone: 'Ownership successfully transferred to {{user}}.',
      banPrompt: 'Banning will make the channel invisible to them.',
    },
  },

  // ?? Commands ????????????????????????????????????????????
  commands: {
    voiceSetup: {
      description: 'Setup a generator voice channel for temporary channels.',
      setDescription: 'Set an existing voice channel as a Generator',
      createDescription: 'Create a new voice channel and set it as a Generator',
      channelOptionDescription: 'The voice channel to act as the Generator',
      categoryOptionDescription: '(Optional) The category where temp channels will be created',
      nameOptionDescription: 'The name of the new generator voice channel',
      setSuccess: 'Successfully set up {{channel}} as a Voice Generator Channel!',
      createSuccess: 'Successfully created and set up {{channel}} as a Voice Generator Channel!',
    },
    voiceConfig: {
      description: 'Manage guild-specific settings for temporary voice channels.',
      setNameTitle: 'Set Default Name Template',
      setNameDesc: 'Set the default naming format for new temp channels. (Username placeholder: {{username}})',
      setLimitTitle: 'Set Default User Limit',
      setLimitDesc: 'Set the default user limit for new temp channels.',
      statusTitle: 'Current Server Voice Settings',
      templateLabel: 'Name Template',
      limitLabel: 'Default User Limit',
      setSuccess: 'Server temporary channel settings updated successfully.',
      limitValue: '{{limit}} users (0 = unlimited)',
    },
    language: {
      description: 'Set the language for the bot.',
      scopeDescription: 'Apply to yourself or the entire server',
      localeDescription: 'Language to use',
      scopeUser: 'Just for me',
      scopeServer: 'Entire server (Admin only)',
      userSet: 'Your personal language has been set to **{{locale}}**.',
      serverSet: 'Server language has been set to **{{locale}}**.',
      serverPermissionDenied: 'Only server administrators can change the server language.',
    },
    event: {
      description: 'Manage scheduled server events.',
      createDescription: 'Create a new server event.',
      listDescription: 'List upcoming server events.',
      cancelDescription: 'Cancel a scheduled server event.',
      announceDescription: 'Post the event announcement embed again.',
      titleDescription: 'Event title',
      dateDescription: 'Date in YYYY-MM-DD format',
      timeDescription: 'Time in HH:mm format (24-hour, Asia/Seoul)',
      descriptionOptionDescription: 'Optional event description',
      channelDescription: 'Optional announcement channel',
      reminderDescription: 'Enable reminder messages',
      remindersDescription: 'Reminder offsets in minutes, for example 0,10,60',
      idDescription: 'Event ID to cancel',
      createSuccessTitle: 'Event Created',
      createSuccessBody: 'The event **{{title}}** has been scheduled.',
      listTitle: 'Upcoming Events',
      listEmpty: 'There are no upcoming scheduled events.',
      listItemValue: '**Starts:** {{startsAt}}\n**Relative:** {{relative}}\n**Status:** {{status}}\n**Reminder:** {{reminder}}\n**Channel:** {{channel}}',
      cancelSuccess: 'The event `{{id}}` has been cancelled.',
      cancelNotFound: 'Could not find a scheduled event with ID `{{id}}`.',
      announceSuccess: 'The event `{{id}}` has been announced in {{channel}}.',
      announceNotAvailable: 'This event does not have a usable announcement channel configured.',
      startAnnouncementTitle: 'Event Started',
      startAnnouncementLead: 'This event is starting now.',
      invalidDateTime: 'The event date or time format is invalid.',
      invalidDateTimeResolution: 'Use `YYYY-MM-DD` for the date and `HH:mm` (24-hour) for the time.',
      invalidReminderOffsets: 'The reminder offset format is invalid.',
      invalidReminderOffsetsResolution: 'Use comma-separated non-negative minutes like `0,10,60`. Leave it empty for no automatic announcements.',
      invalidPastDateTime: 'You cannot schedule an event in the past.',
      invalidPastDateTimeResolution: 'Choose a future date and time, then try again.',
      statusScheduled: 'Scheduled',
      statusCancelled: 'Cancelled',
      statusCompleted: 'Completed',
      reminderOn: 'Enabled',
      reminderOff: 'Disabled',
      reminderNone: 'No automatic announcements',
      announcementChannelNone: 'Not set',
      fields: {
        eventId: 'Event ID',
        startsAt: 'Starts At',
        reminder: 'Reminder',
        announcementChannel: 'Announcement Channel',
        status: 'Status',
      },
    },
    autorole: {
      description: 'Configure automatic role assignment upon joining.',
      statusTitle: 'Auto Role Configuration Status',
      userRoleLabel: 'User Role',
      botRoleLabel: 'Bot Role',
      statusLabel: 'User Auto Assignment',
      botStatusLabel: 'Bot Auto Assignment',
      userRolePlaceholder: 'Select default user role',
      botRolePlaceholder: 'Select default bot role',
      toggleUserEnable: '🟢 Enable User AutoRole',
      toggleUserDisable: '🔴 Disable User AutoRole',
      toggleBotEnable: '🟢 Enable Bot AutoRole',
      toggleBotDisable: '🔴 Disable Bot AutoRole',
      notSet: 'Not Set',
      enabled: 'Enabled',
      disabled: 'Disabled',
      updateSuccess: 'Auto role settings have been updated.',
      permissionsError: 'Failed to assign role due to low bot hierarchy or missing permissions.',
      suspendNotice: 'Auto role assignment has been suspended due to insufficient permissions. Please check the bot\'s permissions and role hierarchy.',
    },
    music: {
      description: 'Play YouTube audio in voice channels.',
      addDescription: 'Search YouTube or add a video URL to the queue.',
      queueDescription: 'Show the current music queue.',
      removeDescription: 'Remove a track from the upcoming queue.',
      pauseDescription: 'Pause the currently playing track.',
      resumeDescription: 'Resume the paused track.',
      skipDescription: 'Skip the currently playing track.',
      stopDescription: 'Stop playback and clear the queue.',
      leaveDescription: 'Disconnect the bot from the voice channel.',
      queryDescription: 'Search query for YouTube',
      urlDescription: 'YouTube video URL',
      indexDescription: 'Queue index to remove',
      addMutuallyExclusive: 'Choose either a search query or a YouTube URL.',
      addMutuallyExclusiveResolution: 'Provide exactly one of `query` or `url`.',
      notInVoice: 'You must be in a voice channel to use music commands.',
      notInVoiceResolution: 'Join a voice channel first, then try again.',
      differentVoiceChannel: 'Music is already being used in another voice channel.',
      differentVoiceChannelResolution: 'Join the same voice channel as the bot or wait until the current session ends.',
      noSearchResults: 'No YouTube results were found for that query.',
      noSearchResultsResolution: 'Try a more specific search phrase or use a direct YouTube URL.',
      invalidUrl: 'The provided YouTube URL is invalid.',
      invalidUrlResolution: 'Use a standard `youtube.com` or `youtu.be` video link.',
      noActiveSession: 'There is no active music session in this server.',
      noActiveSessionResolution: 'Add a track first to start playback.',
      queueAddedNowPlaying: 'Added **{{title}}** and started playback in {{channel}}.',
      queueAddedLater: 'Added **{{title}}** to the queue. Position: `#{{position}}`.',
      playlistAddedNowPlaying: 'Added **{{count}}** tracks from the playlist and started playback in {{channel}}.',
      playlistAddedLater: 'Added **{{count}}** tracks from the playlist to the queue.',
      queueTitle: 'Music Queue',
      queueEmpty: 'The music queue is currently empty.',
      queueNowPlaying: 'Now Playing',
      queueUpcoming: 'Up Next',
      queueMoreItems: '...and **{{count}}** more track(s).',
      queueRemoved: 'Removed **{{title}}** from the queue.',
      queueRemoveOutOfRange: 'That queue index does not exist.',
      queueRemoveOutOfRangeResolution: 'Use `/music queue` to check the current queue indexes first.',
      pauseSuccess: 'Paused the current track.',
      resumeSuccess: 'Resumed playback.',
      skipSuccess: 'Skipped the current track.',
      leaveSuccess: 'Disconnected from the voice channel and cleared the queue.',
      stopSuccess: 'Stopped playback and cleared the queue.',
      playbackStartedTitle: 'Now Playing',
      playbackIdleTitle: 'Queue Finished',
      playbackIdleBody: 'There are no more tracks in the queue.',
      playbackFailed: 'Failed to play **{{title}}**. Skipping to the next track.',
      playbackFailedResolution: 'The stream could not be loaded from YouTube.',
      streamUnavailable: 'Could not load a playable audio stream for this video.',
      streamUnavailableResolution: 'Try another video or add the track again later.',
      requestedBy: 'Requested by',
      duration: 'Duration',
      progress: 'Progress',
      source: 'Source',
      status: 'Status',
      queueLength: 'Queue Length',
      nextTrack: 'Next Track',
      statusPlaying: 'Playing',
      statusPaused: 'Paused',
      unknownDuration: 'Unknown',
      buttons: {
        pause: '??Pause',
        resume: '??Resume',
        skip: '??Skip',
        stop: '??Stop',
        leave: '?몝 Leave',
      },
    },
    fishing: {
      description: 'Play the fishing mini-game.',
      enterDescription: 'Create or reopen your fishing thread.',
      castDescription: 'Start a fishing session inside your fishing thread.',
      endDescription: 'End your fishing thread and delete it.',
      statusDescription: 'View fishing statistics.',
      dexDescription: 'View your fishing collection book.',
      rankingDescription: 'View the biggest fish size ranking in this server.',
      disabled: 'The fishing mini-game is disabled in this server.',
      restrictedChannel: 'Fishing can only be started in {{channel}}.',
      enterTextChannelOnly: 'Fishing threads can only be opened from a regular text channel.',
      enterExistingThread: 'Your fishing thread is already available in {{thread}}.',
      enterCreated: 'Your fishing thread has been created in {{thread}}.',
      castThreadOnly: 'You can only use /fishing cast inside your own fishing thread.',
      startExistingSession: 'You already have an active fishing session in {{thread}}.',
      startCreated: 'Your fishing session has started in {{thread}}.',
      noActiveSession: 'There is no fishing session or thread to close.',
      ownerOnly: 'Only the owner of this fishing session can use these controls.',
      wrongThread: 'This fishing control can only be used inside your fishing thread.',
      endDeleted: 'Your fishing thread has been closed and is being deleted.',
      profileTitle: '{{user}} Fishing Profile',
      profileEmpty: 'There is no fishing record yet.',
      dexTitle: '{{user}} Fishing Dex',
      dexEmpty: 'There are no discovered fish yet.',
      rankingTitle: 'Fishing Size Ranking',
      rankingEmpty: 'There are no fishing records in this server yet.',
      titleActive: 'Fishing Session',
      titleEnded: 'Fishing Session Ended',
      status: 'Status',
      rarity: 'Rarity',
      size: 'Size',
      catchCount: 'Catch Count',
      bestRarity: 'Best Rarity',
      bestSize: 'Best Size',
      targetFish: 'Target Fish',
      distance: 'Distance',
      tension: 'Line Tension',
      reward: 'Reward',
      successRate: 'Success Rate',
      totalCasts: 'Total Casts',
      totalGoldEarned: 'Total Gold',
      bestCatchReward: 'Best Reward',
      rarityBreakdown: 'Rarity Breakdown',
      lastCastAt: 'Last Cast',
      noRecord: 'No record',
      threadHint: 'Use /fishing cast to play again, or /fishing end to delete the thread.',
      catchResultTitle: 'Big Catch!',
      catchResultBody: 'You caught a **{{rarity}} {{fish}}** measuring **{{sizeCm}} cm** and earned **{{reward}} G**.',
      states: {
        hooked: 'Hooked',
        resting: 'Resting',
        tense: 'Pulling',
        missed: 'Missed',
        success: 'Caught',
        failed: 'Line Snapped',
      },
    },
    permissionAudit: {
      title: 'Bot Permission Audit Report',
      channel: 'Channel',
      noResults: 'No features to audit. The bot may not be configured yet.',
      summaryLabel: 'Summary',
      summaryOk: '??All checks passed. No issues found.',
      summaryIssue: '??{{fail}} failure(s) 쨌 ?좑툘 {{warn}} warning(s) detected.',
      hierarchyWarning: "Bot role (pos: {{botPos}}) must be above '{{role}}' (pos: {{targetPos}}) to manage it.",
      features: {
        BASIC: 'Basic Bot Functionality',
        VOICE_GLOBAL: 'Voice Channels (Global)',
        VOICE_GENERATOR_CHANNEL: 'Voice Generator Channel',
        VOICE_GENERATOR_CATEGORY: 'Voice Generator Category',
        MIMIC_WEBHOOK: 'Message Mimic (Webhook)',
      },
    },
    setup: {
      description: 'Run the setup wizard to configure the bot step by step.',
      step0: { 
        title: '??Bot Setup Wizard', 
        desc: 'Welcome! This wizard will help you configure the following 4 features:\n\n1截뤴깵 **Language Settings**\n2截뤴깵 **Permission Check**\n3截뤴깵 **Audit Channel Setup**\n4截뤴깵 **Temporary Voice Channel Setup**', 
        startBtn: 'Start Setup' 
      },
      step1: { 
        title: '1截뤴깵 Language Settings', 
        desc: 'Set the default language for the bot in this server. (Current: **{{locale}}**)', 
        placeholder: 'Select a language', 
        nextBtn: 'Next Step', 
        skipBtn: 'Skip' 
      },
      step2: { 
        title: '2截뤴깵 Permission Check', 
        descOk: '??**All required permissions are granted.**', 
        descFail: '?좑툘 **Some permissions are missing.**\nPlease check the results and grant the necessary permissions to the bot role.', 
        recheckBtn: 'Re-check', 
        nextBtn: 'Next Step' 
      },
      step3: { 
        title: '3截뤴깵 Audit Channel Setup', 
        desc: 'Select a channel to receive bot events and error logs.', 
        placeholder: 'Select Audit Channel', 
        disableBtn: 'Disable Audit Logs', 
        nextBtn: 'Next Step' 
      },
      step4: {
        title: '3-1截뤴깵 Audit Log Categories',
        desc: 'Select which log categories to receive. **Green** buttons are enabled, **Red** buttons are disabled.',
        nextBtn: 'Next Step',
      },
      step5: { 
        title: '4截뤴깵 Temporary Voice Channel Setup', 
        desc: 'Select the "Generator Channel" for temporary voice channels.\nYou can choose an existing channel or have the bot **auto-create** a new category and channel.', 
        placeholder: 'Select Generator Channel', 
        autoBtn: '?? Auto Create', 
        skipBtn: 'Disable Temp Voice', 
        nextBtn: 'Finish Setup' 
      },
      step6: { 
        title: '?럦 Setup Summary', 
        desc: '**1. Language**: {{lang}}\n**2. Audit Channel**: {{audit}}\n**3. Audit Categories**: {{categories}}\n**4. Temp Voice**: {{voice}}', 
        finishBtn: 'Done' 
      },
      finished: '??The setup wizard has been finished.',
      expired: '??The session has expired. Please run `/setup` again.',
      defaultCategoryName: 'Voice Channels',
      defaultGeneratorName: '??Create Channel',
      auditCategories: {
        SYSTEM: 'System',
        BOOT: 'Boot',
        VOICE: 'Voice',
        PERMISSION: 'Permission',
      },
    },
    config: {
      title: 'Feature Configuration',
      noOptions: 'Please provide at least one option to configure.',
      mimic: {
        label: 'Mimic',
        enabled: 'enabled',
        disabled: 'disabled',
      },
      emoji: {
        label: 'Big Emoji',
        enabled: 'enabled',
        disabled: 'disabled',
      },
    },
  },

  // ?? Modals ??????????????????????????????????????????????
  modals: {
    renameTitle: 'Rename Voice Channel',
    renameLabel: 'New Channel Name',
    limitTitle: 'Set User Limit',
    limitLabel: 'User Limit (0 for unlimited, 1-99)',
  },

  // ?? Select Menu Placeholders ????????????????????????????
  selects: {
    kickUser: 'Select a user to kick',
    banUser: 'Select a user to ban/hide',
    transferOwner: 'Select a user to transfer ownership to',
  },

  // ?? Presence (Bot Status) ??
  presence: {
    servers: 'Monitoring {{guildCount}} servers',
    help: 'Check out the /help command',
    managing: 'Managing Temp Voice Channels',
    version: 'Kord v1.0.0',
  },
};



