import type { Messages } from '../types';

export const enAiMessages: Messages = {
  // AI Settings
  'ai.agentSettings': 'Agent Settings',
  'ai.chat.preparing': 'Preparing…',
  'ai.title': 'AI',
  'ai.description': 'Configure AI providers, agents, and safety settings',
  'ai.providers': 'Providers',
  'ai.agents': 'Agents',
  'ai.providers.empty': 'No providers configured. Add a provider to get started.',
  'ai.providers.add': 'Add Provider',
  'ai.providers.active': 'Active',
  'ai.providers.apiKeyConfigured': 'API key configured',
  'ai.providers.noApiKey': 'No API key',
  'ai.providers.configure': 'Configure',
  'ai.providers.remove': 'Remove',
  'ai.providers.name': 'Display Name',
  'ai.providers.name.placeholder': 'e.g. My Provider',
  'ai.providers.style': 'Protocol style',
  'ai.providers.style.anthropic': 'Anthropic-compatible',
  'ai.providers.style.openai': 'OpenAI-compatible',
  'ai.providers.style.google': 'Google-compatible',
  'ai.providers.style.inherited': 'auto',
  'ai.providers.style.help': 'Selects which API format requests use. Override when a third-party endpoint speaks a different dialect than its provider type suggests.',
  'ai.providers.icon.change': 'Change icon',
  'ai.providers.icon.upload': 'Upload image',
  'ai.providers.icon.reset': 'Reset',
  'ai.providers.icon.close': 'Close',
  'ai.providers.icon.uploadedNote': 'Custom icon (64×64 WebP)',
  'ai.providers.icon.errorType': 'Please choose an image file.',
  'ai.providers.apiKey': 'API Key',
  'ai.providers.apiKey.placeholder': 'Enter API key',
  'ai.providers.apiKey.decrypting': 'Decrypting...',
  'ai.providers.baseUrl': 'Base URL',
  'ai.providers.skipTLSVerify': 'Skip TLS certificate verification (for self-signed certs)',
  'ai.providers.defaultModel': 'Default Model',
  'ai.providers.defaultModel.placeholder': 'e.g. gpt-4o, claude-sonnet-4-20250514',
  'ai.providers.contextWindow': 'Context window',
  'ai.providers.contextWindow.placeholder': 'e.g. 128000',
  'ai.providers.contextWindow.help': 'Leave blank to use the model list value when available, otherwise Netcatty uses a safe default.',
  'ai.providers.contextWindow.error': 'Enter a positive whole number, or leave it blank.',
  'ai.providers.refreshModels': 'Refresh models',
  'ai.providers.searchModel': 'Search or type model ID...',
  'ai.providers.filterModels': 'Filter models...',
  'ai.providers.loadingModels': 'Loading models...',
  'ai.providers.noMatchingModels': 'No matching models',
  'ai.providers.clickToLoadModels': 'Click to load models',
  'ai.providers.showingModels': 'Showing first 100 of {count} models. Type to filter.',
  'ai.providers.advancedParams': 'Advanced Parameters',
  'ai.providers.advancedParams.hint': 'Leave blank to use provider defaults.',
  'ai.providers.advancedParams.maxTokens.placeholder': 'e.g. 4096',
  'ai.providers.advancedParams.default': 'Provider default',

  // AI Codex
  'ai.codex': 'Codex',
  'ai.codex.title': 'Codex CLI',
  'ai.codex.description': 'Connect OpenAI Codex. Sign in with ChatGPT here, or enable an OpenAI-compatible provider API key and custom endpoint in Settings.',
  'ai.codex.detecting': 'Detecting...',
  'ai.codex.notFound': 'Not found',
  'ai.codex.awaitingLogin': 'Awaiting login',
  'ai.codex.connectedChatGPT': 'Connected via ChatGPT',
  'ai.codex.connectedApiKey': 'Connected via API key',
  'ai.codex.connectedCustomConfig': 'Connected via ~/.codex/config.toml',
  'ai.codex.customConfigIncomplete': 'Custom config detected (env var missing)',
  'ai.codex.customConfigHint': 'Using custom provider "{provider}" configured in ~/.codex/config.toml — no ChatGPT login needed.',
  'ai.codex.customConfigMissingEnvKey': 'Warning: {envKey} is not set in your shell environment. Export it (or launch netcatty from a shell that has it) so Codex can authenticate.',
  'ai.codex.notConnected': 'Not connected',
  'ai.codex.statusUnknown': 'Status unknown',
  'ai.codex.path': 'Path:',
  'ai.codex.notFoundHint': 'Could not find codex in PATH. Install it or specify the executable path below.',
  'ai.codex.customPathPlaceholder': 'e.g. /usr/local/bin/codex',
  'ai.codex.check': 'Check',
  'ai.codex.openLogin': 'Open Login',
  'ai.codex.logout': 'Logout',
  'ai.codex.connectChatGPT': 'Connect ChatGPT',
  'ai.codex.refreshStatus': 'Refresh Status',

  // AI Claude Code
  'ai.claude.title': 'Claude Code',
  'ai.claude.description': "Anthropic's agentic coding assistant. Requires the system Claude Code CLI.",
  'ai.claude.detecting': 'Detecting...',
  'ai.claude.detected': 'Detected',
  'ai.claude.notFound': 'Not found',
  'ai.claude.path': 'Path:',
  'ai.claude.notFoundHint': 'Could not find claude in PATH. Install it or specify the executable path below.',
  'ai.claude.customPathPlaceholder': 'e.g. /usr/local/bin/claude',
  'ai.claude.configSection': 'Authentication & config (optional)',
  'ai.claude.configDir': 'Config directory',
  'ai.claude.configDir.placeholder': '~/.claude (leave blank for default)',
  'ai.claude.configDir.hint': 'Sets CLAUDE_CONFIG_DIR — point at a folder where you have run `claude` login (contains settings.json + credentials).',
  'ai.claude.settings': 'Settings file',
  'ai.claude.settings.placeholder': '~/team-settings.json  (path, or inline {"model":"..."})',
  'ai.claude.settings.hint': 'Optional. A settings.json path or inline JSON, passed to the SDK as `settings`. Additive to — and independent of — the config directory above (merged on top, not a replacement).',
  'ai.claude.envVars': 'Environment variables',
  'ai.claude.envVars.placeholder': 'ANTHROPIC_BASE_URL=https://...\nANTHROPIC_MODEL=...',
  'ai.claude.envVars.hint': 'One KEY=VALUE per line, passed to the Claude agent. Stored locally in plaintext — for API keys / credentials, prefer the config directory above (a `claude` login).',
  'ai.claude.check': 'Check',

  // AI GitHub Copilot CLI
  'ai.copilot.title': 'GitHub Copilot CLI',
  'ai.copilot.description': 'Uses the GitHub Copilot CLI. Once detected, it can be selected as an external coding agent.',
  'ai.copilot.detecting': 'Detecting...',
  'ai.copilot.detected': 'Detected',
  'ai.copilot.notFound': 'Not found',
  'ai.copilot.path': 'Path:',
  'ai.copilot.notFoundHint': 'Could not find copilot in PATH. Install it or specify the executable path below.',
  'ai.copilot.customPathPlaceholder': 'e.g. /usr/local/bin/copilot',
  'ai.copilot.check': 'Check',

  // AI Cursor SDK
  'ai.cursor.title': 'Cursor',
  'ai.cursor.description': 'Uses the Cursor SDK.',
  'ai.cursor.detecting': 'Detecting...',
  'ai.cursor.detected': 'Available',
  'ai.cursor.notFound': 'Unavailable',
  'ai.cursor.path': 'Runtime:',
  'ai.cursor.notFoundHint': 'Enter an API key to enable Cursor.',
  'ai.cursor.notInstalledHint': 'Cursor SDK was not detected.',
  'ai.cursor.installStatus': 'Cursor SDK',
  'ai.cursor.installed': 'Detected',
  'ai.cursor.notInstalled': 'Not detected',
  'ai.cursor.apiKeyStatus': 'API Key',
  'ai.cursor.apiKeyConfigured': 'Configured',
  'ai.cursor.apiKeyMissing': 'Missing',
  'ai.cursor.apiKeyFromEnv': 'From environment',
  'ai.cursor.apiKey': 'API Key',
  'ai.cursor.apiKeyPlaceholder': 'Enter Cursor API key',
  'ai.cursor.apiKeyPlaceholder.env': 'Using CURSOR_API_KEY; enter a key to override',
  'ai.cursor.apiKeyEnvHint': 'Cursor can use CURSOR_API_KEY from your shell. Save a key here only if you want Netcatty to override it.',
  'ai.cursor.apiKeyOverrideHint': 'Netcatty will use the saved key here before CURSOR_API_KEY.',
  'ai.cursor.saveApiKey': 'Save',
  'ai.cursor.saved': 'Saved',
  'ai.cursor.showApiKey': 'Show API key',
  'ai.cursor.hideApiKey': 'Hide API key',
  'ai.cursor.customPathPlaceholder': 'e.g. /usr/local/bin/cursor',
  'ai.cursor.check': 'Check',

  // AI CodeBuddy Code
  'ai.codebuddy.title': 'CodeBuddy Code',
  'ai.codebuddy.description': 'Uses CodeBuddy Code via the official Agent SDK (`@tencent-ai/agent-sdk`). Once detected, it can be selected as an external coding agent.',
  'ai.codebuddy.detecting': 'Detecting...',
  'ai.codebuddy.detected': 'Detected',
  'ai.codebuddy.notFound': 'Not found',
  'ai.codebuddy.path': 'Path:',
  'ai.codebuddy.notFoundHint': 'Could not find codebuddy in PATH. Install it or specify the executable path below.',
  'ai.codebuddy.customPathPlaceholder': 'e.g. /usr/local/bin/codebuddy',
  'ai.codebuddy.check': 'Check',
  'ai.codebuddy.configSection': 'Authentication & config (optional)',
  'ai.codebuddy.internetEnv': 'Internet Environment',
  'ai.codebuddy.internetEnv.default': 'Default (overseas)',
  'ai.codebuddy.internetEnv.internal': 'Internal',
  'ai.codebuddy.internetEnv.ioa': 'IOA',
  'ai.codebuddy.internetEnv.hint': 'Sets CODEBUDDY_INTERNET_ENVIRONMENT — choose Internal or IOA for restricted network environments.',
  'ai.codebuddy.envVars': 'Environment variables',
  'ai.codebuddy.envVars.placeholder': 'CODEBUDDY_API_KEY=...\nCODEBUDDY_AUTH_TOKEN=...\nOTHER_VAR=...',
  'ai.codebuddy.envVars.hint': 'One KEY=VALUE per line, passed to the CodeBuddy agent. Set CODEBUDDY_API_KEY or CODEBUDDY_AUTH_TOKEN here for authentication. Stored locally in plaintext.',

  // AI Default Agent
  'ai.defaultAgent': 'Default Agent',
  'ai.defaultAgent.description': 'Agent to use when starting a new AI session',
  'ai.defaultAgent.catty': 'Catty (Built-in)',
  'ai.toolAccess.title': 'Tool Access',
  'ai.toolAccess.mode': 'Netcatty Access Mode',
  'ai.toolAccess.description': 'Choose how external agents access Netcatty sessions. MCP exposes the built-in server, while Skills + CLI points agents to the local Netcatty skill and CLI commands.',
  'ai.toolAccess.mode.mcp': 'MCP',
  'ai.toolAccess.mode.skills': 'Skills + CLI',
  'ai.userSkills.title': 'User Skills',
  'ai.userSkills.description': 'Open the Netcatty skills folder to add your own skill directories. Netcatty scans these skills automatically and injects only lightweight indexes unless a skill clearly matches the current request.',
  'ai.userSkills.openFolder': 'Open Skills Folder',
  'ai.userSkills.reload': 'Reload Skills',
  'ai.userSkills.location': 'Location',
  'ai.userSkills.loading': 'Scanning user skills...',
  'ai.userSkills.summary': '{ready} ready, {warnings} warnings',
  'ai.userSkills.empty': 'No user skills found yet. Open the folder to add skill directories with a SKILL.md file.',
  'ai.userSkills.unavailable': 'User skills are unavailable in this environment.',
  'ai.userSkills.status.ready': 'Ready',
  'ai.userSkills.status.warning': 'Warning',

  // AI Quick Messages
  'ai.quickMessages.title': 'Quick Messages',
  'ai.quickMessages.description': 'Create reusable prompts you can insert from the AI chat with / or the quick-message button. Unlike user skills, quick messages fill the composer with text.',
  'ai.quickMessages.add': 'Add Quick Message',
  'ai.quickMessages.createTitle': 'New Quick Message',
  'ai.quickMessages.editTitle': 'Edit Quick Message',
  'ai.quickMessages.name': 'Name',
  'ai.quickMessages.name.placeholder': 'e.g. Check disk space',
  'ai.quickMessages.slug': 'Command',
  'ai.quickMessages.slug.placeholder': 'disk-check',
  'ai.quickMessages.descriptionField': 'Description (optional)',
  'ai.quickMessages.descriptionField.placeholder': 'Short hint about what this prompt does',
  'ai.quickMessages.content': 'Message content',
  'ai.quickMessages.content.placeholder': 'Full prompt text to insert when selected...',
  'ai.quickMessages.empty': 'No quick messages yet. Add a few prompts you use often.',
  'ai.quickMessages.confirmDelete': 'Delete quick message "{name}"?',
  'ai.quickMessages.error.nameRequired': 'Name is required.',
  'ai.quickMessages.error.invalidSlug': 'Command may only contain lowercase letters, numbers, and hyphens.',
  'ai.quickMessages.error.contentRequired': 'Message content is required.',
  'ai.quickMessages.error.slugTaken': 'This command is already used by another quick message.',
  'ai.quickMessages.error.slugConflictsWithSkill': 'This command conflicts with user skill "/{slug}". Choose another.',
  'ai.quickMessages.error.maxItems': 'You can save at most {max} quick messages.',

  // AI Chat
  'ai.chat.noProvider': 'No AI provider is configured. Go to **Settings → AI → Providers** to add and enable a provider.',
  'ai.chat.toolDenied': 'Action was rejected by the user.',
  'ai.chat.toolApproved': 'Approved',
  'ai.chat.toolApprovalHint': 'Press Enter to approve, Escape to reject',
  'ai.chat.approve': 'Approve',
  'ai.chat.reject': 'Reject',
  'ai.chat.toolLabel': 'Tool',
  'ai.chat.targetLabel': 'Target',
  'ai.chat.permissionRequired': 'Permission Required',
  'ai.chat.permissionDescription': 'The AI agent wants to execute a tool call that requires your approval.',
  'ai.chat.commandBlocked': 'This command is blocked by your security policy and cannot be executed.',
  'ai.chat.recommendAllow': 'Allow',
  'ai.chat.recommendConfirm': 'Confirm',
  'ai.chat.recommendDeny': 'Deny',
  'ai.chat.exportConversation': 'Export conversation',
  'ai.chat.exportAs': 'Export As',
  'ai.chat.exportMarkdown': 'Markdown',
  'ai.chat.exportJSON': 'JSON',
  'ai.chat.exportPlainText': 'Plain Text',
  'ai.chat.thinking': 'Thinking',
  'ai.chat.thoughtFor': 'Thought for {duration}',
  'ai.chat.thought': 'Thought',
  'ai.chat.agents': 'Agents',
  'ai.chat.detectedOnMachine': 'Detected on this machine',
  'ai.chat.rescan': 'Re-scan',
  'ai.chat.permObserver': 'Observer',
  'ai.chat.permConfirm': 'Confirm',
  'ai.chat.permAuto': 'Auto',
  'ai.chat.permObserverDesc': 'Read only',
  'ai.chat.permConfirmDesc': 'Ask before actions',
  'ai.chat.permAutoDesc': 'Execute freely',
  'ai.chat.emptyHint': 'Ask about your servers, run commands, or get help with configurations.',
  'ai.chat.placeholder': 'Message {agent} — @ to include context, / for commands',
  'ai.chat.placeholderDefault': 'Message Catty Agent...',
  'ai.chat.noModel': 'No model',
  'ai.chat.noProviderModel': 'No default model — set one in Settings → AI → Providers.',
  'ai.chat.selectProvider': 'Select provider',
  'ai.chat.recent': 'Recent',
  'ai.chat.viewAll': 'View All',
  'ai.chat.untitled': 'Untitled',
  'ai.chat.justNow': 'Just now',
  'ai.chat.minutesAgo': '{n}m ago',
  'ai.chat.hoursAgo': '{n}h ago',
  'ai.chat.daysAgo': '{n}d ago',
  'ai.chat.newChat': 'New Chat',
  'ai.chat.allSessions': 'All Sessions',
  'ai.chat.loadEarlierMessages': 'Load earlier messages ({n} more)',
  'ai.chat.usedTools': 'Tools used: {n}',
  'ai.chat.loadMoreSessions': 'Load more sessions ({n} more)',
  'ai.chat.noSessions': 'No previous sessions',
  'ai.chat.retryHint': 'You can retry by sending your message again.',
  'ai.chat.approvalTimeout': 'Tool approval timed out after 5 minutes. You can retry by sending your message again.',
  'ai.chat.menuHosts': 'Hosts',
  'ai.chat.menuContext': 'Context',
  'ai.chat.menuFiles': 'Files',
  'ai.chat.menuImage': 'Image',
  'ai.chat.menuMentionHost': 'Mention Host',
  'ai.chat.menuUserSkills': 'User Skills',
  'ai.chat.menuSlashCommands': 'Slash Commands',
  'ai.chat.slashCommands': 'Slash commands',
  'ai.chat.slashQuickMessages': 'Quick messages',
  'ai.chat.slashUserSkills': 'User skills',
  'ai.chat.quickMessages': 'Slash commands',
  'ai.chat.slashNoResults': 'No matching commands',
  'ai.chat.slashEmptyHint': 'Add prompts in Settings → AI → Quick Messages.',

  // AI Chat Shortcuts
  'ai.chatShortcuts.title': 'Chat Shortcuts',
  'ai.chatShortcuts.selectionAction': 'Show Add to Conversation when selecting terminal text',
  'ai.chatShortcuts.selectionAction.description': 'Show a small AI button next to selected terminal text.',

  // AI Error
  'ai.codex.bridgeError': 'Codex main-process handlers are not loaded yet. Fully restart Netcatty, or restart the Electron dev process, then try again.',

  // AI Web Search
  'ai.webSearch.title': 'Web Search',
  'ai.webSearch.enable': 'Enable Web Search',
  'ai.webSearch.enable.description': 'Allow the AI agent to search the web for current information.',
  'ai.webSearch.provider': 'Search Provider',
  'ai.webSearch.provider.description': 'Choose a web search API provider.',
  'ai.webSearch.apiKey': 'API Key',
  'ai.webSearch.apiKey.description': 'API key for the selected search provider.',
  'ai.webSearch.apiKey.placeholder': 'Enter API key...',
  'ai.webSearch.apiHost': 'API Host',
  'ai.webSearch.apiHost.description': 'Custom API endpoint. Leave default unless you use a proxy.',
  'ai.webSearch.apiHost.searxngDescription': 'URL of your SearXNG instance (required).',
  'ai.webSearch.maxResults': 'Max Results',
  'ai.webSearch.maxResults.description': 'Maximum number of search results to return (1-20).',

  // AI Safety Settings
  'ai.safety.title': 'Safety',
  'ai.safety.permissionMode': 'Permission Mode',
  'ai.safety.permissionMode.description': 'Controls how the AI interacts with your Netcatty terminal sessions. Observer mode blocks write operations that go through Netcatty. External agent CLIs may still have their own local tools and approval flow.',
  'ai.safety.permissionMode.observer': 'Observer - Read only, no actions',
  'ai.safety.permissionMode.confirm': 'Confirm - Ask before actions',
  'ai.safety.permissionMode.autonomous': 'Autonomous - Execute freely',
  'ai.safety.commandTimeout': 'Command Timeout',
  'ai.safety.commandTimeout.description': 'Maximum seconds a command can run before being terminated through Netcatty execution.',
  'ai.safety.commandTimeout.unit': 'sec',
  'ai.safety.maxIterations': 'Max Iterations',
  'ai.safety.maxIterations.description': 'Maximum number of AI tool-use loops to prevent runaway execution. External agents may have their own internal iteration limits that take precedence.',
  'ai.safety.blocklist': 'Command Blocklist',
  'ai.safety.blocklist.description': 'Regex patterns to block dangerous commands executed through Netcatty.',
  'ai.safety.blocklist.placeholder': 'Regex pattern...',
  'ai.safety.blocklist.reset': 'Reset to defaults',
  'ai.safety.blocklist.add': 'Add pattern',
  'ai.safety.note': 'These safety settings are enforced for actions that go through Netcatty. External agent CLIs may also expose local tools that are governed by the agent itself.',

  // Unified tooltips for terminal workspace and top tabs (issue #954)
  'terminal.layer.addTerminal': 'Add Terminal',
  'terminal.layer.switchToSplitView': 'Switch to Split View',
  'terminal.layer.sftp': 'SFTP',
  'terminal.layer.scripts': 'Scripts',
  'terminal.layer.history': 'History',
  'terminal.layer.theme': 'Theme',
  'terminal.layer.aiChat': 'AI Chat',
  'terminal.layer.movePanelLeft': 'Move panel to left',
  'terminal.layer.movePanelRight': 'Move panel to right',
  'terminal.layer.closePanel': 'Close panel',
  'terminal.layer.hostTree.search': 'Search hosts...',
  'terminal.layer.hostTree.searchButton': 'Search',
  'terminal.layer.hostTree.tagsButton': 'Filter by tags',
  'terminal.layer.hostTree.newGroup': 'New group',
  'terminal.layer.hostTree.localShell': 'Local shell',
  'terminal.layer.hostTree.tagsEmpty': 'No tags available',
  'terminal.layer.hostTree.clearTags': 'Clear selection',
  'terminal.layer.hostTree.collapse': 'Collapse host list',
  'terminal.layer.hostTree.expand': 'Expand host list',
  'terminal.layer.hostTree.empty': 'No hosts found',
  'terminal.layer.hostTree.details.host': 'Host',
  'terminal.layer.hostTree.details.user': 'User',
  'terminal.layer.hostTree.details.port': 'Port',
  'terminal.layer.hostTree.details.protocol': 'Protocol',
  'terminal.layer.hostTree.details.group': 'Group',
  'terminal.layer.hostTree.details.tags': 'Tags',
  'terminal.layer.hostTree.details.lastConnected': 'Last connected',
  'topTabs.openQuickSwitcher': 'Open quick switcher',
  'topTabs.moreTabs': 'More tabs',
  'topTabs.aiAssistant': 'AI Assistant',
  'topTabs.windowOpacity': 'Window opacity',
  'topTabs.toggleTheme': 'Toggle theme',
  'topTabs.openSettings': 'Open Settings',
  'ai.chat.sessionHistory': 'Session history',
  'ai.chat.attach': 'Attach',
  'ai.chat.terminalSelectionAttachment': 'Terminal selection',
  'ai.chat.terminalSelectionLines': 'lines: {count}',
  'ai.chat.collapse': 'Collapse',
  'ai.chat.expand': 'Expand',
  'ai.chat.enableAgent': 'Enable {name}',
  'zmodem.waitingForRemote': 'Waiting for remote...',
  'zmodem.uploading': 'Uploading',
  'zmodem.downloading': 'Downloading',
  'zmodem.cancelTransfer': 'Cancel transfer (Ctrl+C)',
  'zmodem.overwrite.title': 'Remote file already exists',
  'zmodem.overwrite.applyToRest': 'Apply to remaining conflicts',
  'zmodem.overwrite.overwrite': 'Overwrite',
  'zmodem.overwrite.skip': 'Skip',
  'zmodem.overwrite.cancel': 'Cancel',
  'settings.shortcuts.resetToDefault': 'Reset to default',
};
