import {
  CompassIcon,
  ImageIcon,
  MicroscopeIcon,
  PenLineIcon,
  ShapesIcon,
  SparklesIcon,
  VideoIcon,
} from "lucide-react";

import type { Translations } from "./types";

export const enUS: Translations = {
  // Locale meta
  locale: {
    localName: "English",
  },

  // Common
  common: {
    home: "Home",
    settings: "Settings",
    delete: "Delete",
    rename: "Rename",
    share: "Share",
    fullScreen: "fullScreen",
    closeFullScreen: "closeFullScreen",
    openInNewWindow: "Open in new window",
    close: "Close",
    more: "More",
    search: "Search",
    download: "Download",
    downloadOriginal: "Original File",
    downloadAsDocx: "Download as DOCX",
    downloadAsPdf: "Download as PDF",
    thinking: "Thinking",
    artifacts: "Artifacts",
    public: "Public",
    custom: "Custom",
    notAvailableInDemoMode: "Not available in demo mode",
    loading: "Loading...",
    version: "Version",
    lastUpdated: "Last updated",
    code: "Code",
    preview: "Preview",
    cancel: "Cancel",
    save: "Save",
    install: "Install",
    create: "Create",
    export: "Export",
    exportAsMarkdown: "Export as Markdown",
    exportAsJSON: "Export as JSON",
    exportSuccess: "Conversation exported",
    removeAttachment: "Remove attachment",
    reference: "Reference",
    resetThread: "Reset thread",
  },

  // Welcome
  welcome: {
    greeting: "Hello, again!",
    description:
      "Welcome to 🦌 XClaw, an open source super agent. With built-in and custom skills, XClaw helps you search on the web, analyze data, and generate artifacts like slides, web pages and do almost anything.",

    createYourOwnSkill: "Create Your Own Skill",
    createYourOwnSkillDescription:
      "Create your own skill to release the power of XClaw. With customized skills,\nXClaw can help you search on the web, analyze data, and generate\n artifacts like slides, web pages and do almost anything.",
  },

  // Clipboard
  clipboard: {
    copyToClipboard: "Copy to clipboard",
    copiedToClipboard: "Copied to clipboard",
    failedToCopyToClipboard: "Failed to copy to clipboard",
    linkCopied: "Link copied to clipboard",
  },

  // Input Box
  inputBox: {
    placeholder: "How can I assist you today?",
    welcomePlaceholder:
      "Start chatting directly, or describe your task and pick a skill for professional execution.",
    chatPlaceholder: "Type “@” to reference files.",
    createSkillPrompt:
      "We're going to build a new skill step by step with `skill-creator`. To start, what do you want this skill to do?",
    sendMessagePrice:
      "Please note, this feature will consume tokens. Ensure your account balance is greater than 200 credits.",
    addAttachments: "Add attachments",
    history: "History",
    welcome:"Welcome",
    selectSkill: "Select Skill",
    mode: "Mode",
    flashMode: "Flash",
    flashModeDescription: "Fast and efficient, but may not be accurate",
    reasoningMode: "Reasoning",
    reasoningModeDescription:
      "Reasoning before action, balance between time and accuracy",
    proMode: "Pro",
    proModeDescription:
      "Reasoning, planning and executing, get more accurate results, may take more time",
    ultraMode: "Ultra",
    ultraModeDescription:
      "Pro mode with subagents to divide work; best for complex multi-step tasks",
    reasoningEffort: "Reasoning Effort",
    reasoningEffortMinimal: "Minimal",
    reasoningEffortMinimalDescription: "Retrieval + Direct Output",
    reasoningEffortLow: "Low",
    reasoningEffortLowDescription: "Simple Logic Check + Shallow Deduction",
    reasoningEffortMedium: "Medium",
    reasoningEffortMediumDescription:
      "Multi-layer Logic Analysis + Basic Verification",
    reasoningEffortHigh: "High",
    reasoningEffortHighDescription:
      "Full-dimensional Logic Deduction + Multi-path Verification + Backward Check",
    searchModels: "Search models...",
    surpriseMe: "Surprise",
    surpriseMePrompt: "Surprise me",
    followupLoading: "Generating follow-up questions...",
    followupConfirmTitle: "Send suggestion?",
    followupConfirmDescription:
      "You already have text in the input. Choose how to send it.",
    followupConfirmAppend: "Append & send",
    followupConfirmReplace: "Replace & send",
    submit: "Send",
    submitting: "Generating...",
    stop: "Stop",
    addReference: "Add reference",
    referenceSourceArtifact: "Generated file",
    referenceSourceUpload: "Uploaded attachment",
    maxReferencesReached: "You can reference up to 10 files per message",
    suggestions: [
      {
        suggestion: "Paper Writing",
        prompt:
          "Write an academic paper about [topic], including abstract, introduction, body and references.",
        icon: PenLineIcon,
        children: [{ id: "1245", name: "Paper Writing" }],
      },
      {
        suggestion: "Report Generation",
        prompt:
          "Analyze [topic] in depth and generate a well-structured research report.",
        icon: MicroscopeIcon,
        children: [{ id: "520", name: "Report Generation" }],
      },
      {
        suggestion: "Copywriting",
        prompt:
          "Create a complete planning proposal and promotional copy for [project/event].",
        icon: ShapesIcon,
        children: [{ id: "409", name: "Copywriting" }],
      },
      {
        suggestion: "Document Processing",
        prompt:
          "Process [document] with reading, summarizing, translating or format conversion.",
        icon: CompassIcon,
        children: [{ id: "5", name: "Document Processing" }],
      },
      {
        suggestion: "Market Research",
        prompt: "TestingTestingTestingTestingTesting",
        icon: ShapesIcon,
        children: [{ id: "1216", name: "Market Research" }],
      },
    ],
    suggestionsCreate: [
      {
        suggestion: "Webpage",
        prompt: "Create a webpage about [topic]",
        icon: CompassIcon,
      },
      {
        suggestion: "Image",
        prompt: "Create an image about [topic]",
        icon: ImageIcon,
      },
      {
        suggestion: "Video",
        prompt: "Create a video about [topic]",
        icon: VideoIcon,
      },
      {
        type: "separator",
      },
      {
        suggestion: "Skill",
        prompt:
          "We're going to build a new skill step by step with `skill-creator`. To start, what do you want this skill to do?",
        icon: SparklesIcon,
      },
    ],
  },

  // Sidebar
  sidebar: {
    newChat: "New chat",
    chats: "Chats",
    recentChats: "Recent chats",
    demoChats: "Demo chats",
    agents: "Agents",
  },

  // Agents
  agents: {
    title: "Agents",
    description:
      "Create and manage custom agents with specialized prompts and capabilities.",
    newAgent: "New Agent",
    emptyTitle: "No custom agents yet",
    emptyDescription:
      "Create your first custom agent with a specialized system prompt.",
    chat: "Chat",
    delete: "Delete",
    deleteConfirm:
      "Are you sure you want to delete this agent? This action cannot be undone.",
    deleteSuccess: "Agent deleted",
    newChat: "New chat",
    createPageTitle: "Design your Agent",
    createPageSubtitle:
      "Describe the agent you want — I'll help you create it through conversation.",
    nameStepTitle: "Name your new Agent",
    nameStepHint:
      "Letters, digits, and hyphens only — stored lowercase (e.g. code-reviewer)",
    nameStepPlaceholder: "e.g. code-reviewer",
    nameStepContinue: "Continue",
    nameStepInvalidError:
      "Invalid name — use only letters, digits, and hyphens",
    nameStepAlreadyExistsError: "An agent with this name already exists",
    nameStepCheckError: "Could not verify name availability — please try again",
    nameStepBootstrapMessage:
      "The new custom agent name is {name}. Let's bootstrap it's **SOUL**.",
    agentCreated: "Agent created!",
    startChatting: "Start chatting",
    backToGallery: "Back to Gallery",
  },

  // Breadcrumb
  breadcrumb: {
    workspace: "Workspace",
    chats: "Chats",
  },

  // Workspace
  workspace: {
    officialWebsite: "XClaw's official website",
    githubTooltip: "XClaw on Github",
    settingsAndMore: "Settings and more",
    visitGithub: "XClaw on GitHub",
    reportIssue: "Report a issue",
    contactUs: "Contact us",
    about: "About XClaw",
  },

  // Conversation
  conversation: {
    noMessages: "No messages yet",
    startConversation: "Start a conversation to see messages here",
  },

  // Chats
  chats: {
    searchChats: "Search chats",
    scrollToBottom: "Scroll to bottom",
  },

  threadMemoryPanel: {
    title: "Thread Memory",
    load: "Load memory",
    loading: "Loading...",
    save: "Save memory",
    saving: "Saving...",
    remove: "Delete memory",
    removing: "Deleting...",
    threadId: "Thread ID",
    version: "Version",
    unavailableVersion: "-",
    summaryPlaceholder: "Thread memory summary is shown here. Edit it and save.",
    toastLoadSuccess: "Thread memory loaded",
    toastLoadFailed: "Failed to load thread memory",
    toastConflict: "Memory changed. Please reload before saving.",
    toastSaveSuccess: "Thread memory saved",
    toastSaveFailed: "Failed to save thread memory",
    toastDeleteSuccess: "Thread memory deleted",
    toastDeleteFailed: "Failed to delete thread memory",
  },

  // Workspace Chat Page
  chatPage: {
    defaultSlogan: "Let's study and work together",
    missingThreadIdForCreate: "Missing thread_id, cannot create session",
    createSessionFailed: "Failed to create session, please try again later",
    conversationFinished: "Conversation finished",
    missingThreadIdForSend: "Missing thread_id, cannot send message",
    viewArtifactsTooltip: "Click to view generated artifacts",
    noArtifactSelectedTitle: "No artifact selected",
    noArtifactSelectedDescription: "Select an artifact to view its details",
    exitDialogTitle: "Notice",
    exitDialogDescription:
      "Chat history is automatically deleted every seven days. You will return to the welcome page now. Continue?",
    exitDialogConfirm: "Confirm",
    selectedSkillLoadFailed: "Failed to load skill",
    unknownErrorRetry: "An unknown error occurred. Please try again later.",
  },

  messageListItem: {
    materializing: "Parsing...",
    importAsSkillDir: "Import as Skill directory",
    materializeSuccess: (files: number, directories: number) =>
      `Created ${files} file(s) / ${directories} director${directories === 1 ? "y" : "ies"}`,
    parseFailed: "Parse failed",
    materializeFailed: (message: string) => `Failed: ${message}`,
  },

  artifactPreview: {
    pdfPreviewFailed: "Unable to preview this PDF file. Please download it.",
    unsupportedType: "This file type is not previewable in the custom viewer.",
    docxPreviewFailed: "Unable to preview this DOCX file.",
    excelPreviewFailed: "Unable to preview this Excel file.",
    switchSheetFailed: "Failed to switch worksheet.",
    excelGridPreviewFailed: "Unable to render Excel grid preview.",
    pptxDownloadHint: "Please download the PPT file for the best experience.",
    openInNewTab: "Open in new tab",
    clickToDownload: "Click to download",
    pageCountLabel: (fileName: string, pageCount: number) =>
      `${fileName} · ${pageCount} page(s)`,
    zoomIn: "Zoom in",
    zoomOut: "Zoom out",
    showArtifactsTooltip: "Show artifacts of this conversation",
  },

  workspaceHeader: {
    sidebarTitle: "XClaw Sidebar",
  },

  models: {
    updating: "System is updating, please wait...",
    apiUnavailable:
      "Model API is unavailable. Please check backend routes or service status.",
  },

  threads: {
    streamError: "Something went wrong.",
    billingInsufficientBalance:
      "The account balance is insufficient for this model call.",
    invalidThreadId: "Invalid thread id 'new'. Please refresh and retry.",
    staleReferencesRemoved:
      "Some referenced files were invalid and were removed automatically.",
    uploadFailed: "Failed to upload files.",
    uploadPrepareFailed: (count: number) =>
      `Failed to prepare ${count} attachment(s) for upload. Please retry.`,
    threadNotReadyForUpload: "Thread is not ready for file upload.",
  },

  skills: {
    loadFailed: "Failed to load skill",
    missingThreadId: "Missing thread_id, cannot initialize skill",
    invalidSkillId: "Invalid skill_id",
    loading: (title: string) => `Loading skill "${title}"...`,
    loadFailedWithTitle: (title: string) => `Failed to load skill "${title}"`,
    loadSuccessWithTitle: (title: string) =>
      `Skill "${title}" loaded successfully`,
    loadErrorWithTitle: (title: string) => `Error loading skill "${title}"`,
    unknownError: "Unknown error",
    networkRequestFailed: "Network request failed",
    createdFiles: (count: number) => `Created ${count} file(s)`,
    invalidSkillIdArray: "Invalid skill_id array",
  },

  // Page titles (document title)
  pages: {
    appName: "XClaw",
    chats: "Chats",
    newChat: "New chat",
    untitled: "Untitled",
  },

  // Tool calls
  toolCalls: {
    moreSteps: (count: number) => `${count} more step${count === 1 ? "" : "s"}`,
    lessSteps: "Less steps",
    executeCommand: "Execute command",
    presentFiles: "Present files",
    needYourHelp: "Need your help",
    useTool: (toolName: string) => `Use "${toolName}" tool`,
    searchFor: (query: string) => `Search for "${query}"`,
    searchForRelatedInfo: "Search for related information",
    searchForRelatedImages: "Search for related images",
    searchForRelatedImagesFor: (query: string) =>
      `Search for related images for "${query}"`,
    searchOnWebFor: (query: string) => `Search on the web for "${query}"`,
    viewWebPage: "View web page",
    listFolder: "List folder",
    readFile: "Read file",
    writeFile: "Write file",
    clickToViewContent: "Click to view file content",
    writeTodos: "Update to-do list",
    expandContent: "Expand",
    collapseContent: "Collapse",
    skillInstallTooltip: "Install skill and make it available to XClaw",
  },

  // Subtasks
  uploads: {
    uploading: "Uploading...",
    uploadingFiles: "Uploading files, please wait...",
  },

  subtasks: {
    subtask: "Subtask",
    executing: (count: number) =>
      `Executing ${count === 1 ? "" : count + " "}subtask${count === 1 ? "" : "s in parallel"}`,
    in_progress: "Running subtask",
    completed: "Subtask completed",
    failed: "Subtask failed",
  },

  // Token Usage
  tokenUsage: {
    title: "Token Usage",
    input: "Input",
    output: "Output",
    total: "Total",
  },

  // Shortcuts
  shortcuts: {
    searchActions: "Search actions...",
    noResults: "No results found.",
    actions: "Actions",
    keyboardShortcuts: "Keyboard Shortcuts",
    keyboardShortcutsDescription:
      "Navigate XClaw faster with keyboard shortcuts.",
    openCommandPalette: "Open Command Palette",
    toggleSidebar: "Toggle Sidebar",
  },

  // Settings
  settings: {
    title: "Settings",
    description: "Adjust how XClaw looks and behaves for you.",
    sections: {
      appearance: "Appearance",
      memory: "Memory",
      tools: "Tools",
      skills: "Skills",
      notification: "Notification",
      about: "About",
    },
    memory: {
      title: "Memory",
      description:
        "XClaw automatically learns from your conversations in the background. These memories help XClaw understand you better and deliver a more personalized experience.",
      empty: "No memory data to display.",
      rawJson: "Raw JSON",
      markdown: {
        overview: "Overview",
        userContext: "User context",
        work: "Work",
        personal: "Personal",
        topOfMind: "Top of mind",
        historyBackground: "History",
        recentMonths: "Recent months",
        earlierContext: "Earlier context",
        longTermBackground: "Long-term background",
        updatedAt: "Updated at",
        facts: "Facts",
        empty: "(empty)",
        table: {
          category: "Category",
          confidence: "Confidence",
          confidenceLevel: {
            veryHigh: "Very high",
            high: "High",
            normal: "Normal",
            unknown: "Unknown",
          },
          content: "Content",
          source: "Source",
          createdAt: "CreatedAt",
          view: "View",
        },
      },
    },
    appearance: {
      themeTitle: "Theme",
      themeDescription:
        "Choose how the interface follows your device or stays fixed.",
      system: "System",
      light: "Light",
      dark: "Dark",
      systemDescription: "Match the operating system preference automatically.",
      lightDescription: "Bright palette with higher contrast for daytime.",
      darkDescription: "Dim palette that reduces glare for focus.",
      languageTitle: "Language",
      languageDescription: "Switch between languages.",
    },
    tools: {
      title: "Tools",
      description: "Manage the configuration and enabled status of MCP tools.",
    },
    skills: {
      title: "Agent Skills",
      description:
        "Manage the configuration and enabled status of the agent skills.",
      createSkill: "Create skill",
      emptyTitle: "No agent skill yet",
      emptyDescription:
        "Put your agent skill folders under the `/skills/custom` folder under the root folder of XClaw.",
      emptyButton: "Create Your First Skill",
    },
    notification: {
      title: "Notification",
      description:
        "XClaw only sends a completion notification when the window is not active. This is especially useful for long-running tasks so you can switch to other work and get notified when done.",
      requestPermission: "Request notification permission",
      deniedHint:
        "Notification permission was denied. You can enable it in your browser's site settings to receive completion alerts.",
      testButton: "Send test notification",
      testTitle: "XClaw",
      testBody: "This is a test notification.",
      notSupported: "Your browser does not support notifications.",
      disableNotification: "Disable notification",
    },
    acknowledge: {
      emptyTitle: "Acknowledgements",
      emptyDescription: "Credits and acknowledgements will show here.",
    },
  },
};
