/* Bilingual copy. Toggle in nav switches lang. */
const COPY = {
  en: {
    nav: { features: "Features", mockup: "Preview", mcp: "MCP", docs: "Docs", compare: "Compare" },
    hero: {
      eyebrow: "Open source · MIT · Tauri + Rust",
      title_a: "The eye that watches",
      title_b: "your databases.",
      lede:
        "HuginnDB is a fast, keyboard-first desktop client for PostgreSQL, MySQL, SQLite, MongoDB and SQL Server. Built around a real editor — not a glorified table viewer.",
      cta_download: "Download for desktop",
      cta_github: "View on GitHub",
      meta_alpha: "stable",
      meta_platforms: "windows · linux · macos*",
      meta_license: "MIT licensed",
    },
    compare: {
      eyebrow: "HuginnDB vs. DBeaver, TablePlus, HeidiSQL & DataGrip",
      line: "Full Monaco cell editor, OS-keychain credentials, and a free MCP connector for AI clients — see where the other four stack up.",
      cta: "Full comparison",
      href: "/compare/",
      tools: ["HuginnDB", "DBeaver", "TablePlus", "HeidiSQL", "DataGrip"],
    },
    mockup: {
      tag: "Inside HuginnDB",
      title: "Every cell is a real editor. The SQL pane is the same editor.",
      sub: "No popup soup, no nested toolbars. Monaco — the engine behind VS Code — does the heavy lifting, both for cell inspection and for the query workspace.",
    },
    why: {
      tag: "Why HuginnDB",
      title: "A narrower scope than the IDE-style DB clients.",
      sub: "Most database GUIs are heavyweight Java suites or web dashboards that fight you the moment you open a JSON blob. HuginnDB picks a handful of things to do well.",
      cards: [
        { n: "01", t: "Cell inspection first", b: "Open any cell into a full Monaco editor with auto-detected JSON / XML / SQL highlighting, format, live validation and F11 fullscreen." },
        { n: "02", t: "A real SQL editor", b: "Schema-aware autocomplete, query history per connection that survives restarts, saved queries with tags. Ctrl+Enter and go." },
        { n: "03", t: "Keyboard-first, minimal chrome", b: "Dark by default. No nested toolbars, no popup soup. The shortcuts you already use from your text editor work here too." },
        { n: "04", t: "Credentials in the OS keychain", b: "Passwords never touch disk in plaintext. Windows Credential Manager, libsecret on Linux, Keychain on macOS. The frontend never sees the connection string." },
        { n: "05", t: "Multi-driver, one UI", b: "PostgreSQL, MySQL, SQLite, MongoDB and SQL Server — each with its own connection dialog and the right defaults. Driver-specific quirks stay out of the way." },
        { n: "06", t: "Themeable like an editor", b: "Five built-in presets plus a visual colour editor. Editing a preset forks it into a custom theme — the originals stay pristine." },
      ],
    },
    mcp: {
      tag: "AI · MCP connector",
      title: "Point your AI assistant at the real schema, not a guess.",
      sub: "huginndb-mcp is a headless Model Context Protocol server that exposes the connections you already saved in HuginnDB — profiles.json, passwords read from the OS keychain — to Claude Code, Claude Desktop, Cursor, Antigravity or Codex. Any spec-compliant MCP client works the same way once it's pointed at the binary.",
      panel_note: "Settings → MCP in the app resolves the binary path and generates every snippet below for you — pick which saved connections to expose, then paste.",
      policies_title: "Write policy, set per connection",
      policies: [
        { t: "read-only", tone: "ok", d: "Default. Only SELECT / find / describe — every write tool is refused." },
        { t: "data", tone: "warn", d: "Adds row-level INSERT / UPDATE / DELETE. No schema changes." },
        { t: "full", tone: "rose", d: "Adds DDL — CREATE / DROP / ALTER / TRUNCATE." },
      ],
      policies_note: "Re-read from disk on every write attempt — change a connection's level in the app and it takes effect without restarting your AI client.",
      clients_title: "Configuring a client",
      clients: [
        {
          id: "claude-code",
          label: "Claude Code",
          lang: "bash",
          code: "claude mcp add huginndb -s user -- /path/to/huginndb-mcp --connections <profile-id>",
          caption: "Or hand-write ~/.claude.json, or a project .mcp.json:",
          code2lang: "json",
          code2: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/path/to/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
        },
        {
          id: "claude-desktop",
          label: "Claude Desktop",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/path/to/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: "Settings → Developer → Edit Config, then restart the app.",
        },
        {
          id: "cursor",
          label: "Cursor",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/path/to/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: ".cursor/mcp.json (project) or ~/.cursor/mcp.json (global) — or Settings → MCP → Add new global MCP server.",
        },
        {
          id: "antigravity",
          label: "Antigravity",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/path/to/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: "Agent panel → “…” menu → MCP Servers → Manage MCP Servers → View raw config.",
        },
        {
          id: "codex",
          label: "Codex CLI",
          lang: "toml",
          code: "[mcp_servers.huginndb]\ncommand = \"/path/to/huginndb-mcp\"\nargs = [\"--connections\", \"<profile-id>\"]",
          caption: "~/.codex/config.toml — or: codex mcp add huginndb -- /path/to/huginndb-mcp --connections <profile-id>",
        },
      ],
      tools_title: "Tools exposed",
      tools: [
        { t: "list_connections", d: "Which databases this server can reach, with effective write policy." },
        { t: "list_tables / describe_table", d: "Tables, views, columns, types, PK/FK, indexes." },
        { t: "run_query", d: "SQL or mongosh-style, gated by write policy." },
        { t: "browse_table", d: "Page through rows without writing a query." },
        { t: "insert_row / update_cell / delete_rows", d: "Row-level writes, PK-addressed. Requires data or full." },
        { t: "server_version / list_users", d: "Engine version, server-side users and privileges." },
      ],
      cta: "Full reference in docs/MCP.md",
      copy: "Copy",
      copied: "Copied",
    },
    dev: {
      kicker: "Behind the project",
      name: "Alex · solo developer",
      body:
        "I built HuginnDB because every database GUI I tried either fought me on JSON columns or buried the SQL editor under three nested tabs. It's open source because that's the only honest way to ship developer tools. If something breaks, open an issue — I'll see it.",
    },
    footer: {
      blurb: "A keyboard-first desktop database manager. Open source, MIT, built with Tauri and Rust.",
      cols: [
        { h: "Project", links: [["GitHub", "https://github.com/Alexfp28/huginnDB"], ["Releases", "https://github.com/Alexfp28/huginnDB/releases"], ["Compare", "/compare/"], ["Roadmap", "https://github.com/Alexfp28/huginnDB#roadmap"]] },
        { h: "Docs", links: [["README", "https://github.com/Alexfp28/huginnDB#readme"], ["MCP connector", "https://github.com/Alexfp28/huginnDB/blob/main/docs/MCP.md"], ["Contributing", "https://github.com/Alexfp28/huginnDB/blob/main/CONTRIBUTING.md"], ["Security", "https://github.com/Alexfp28/huginnDB/blob/main/SECURITY.md"], ["License", "https://github.com/Alexfp28/huginnDB/blob/main/LICENSE"]] },
        { h: "Author", links: [["shion.es", "https://shion.es"], ["GitHub profile", "https://github.com/Alexfp28"], ["Report an issue", "https://github.com/Alexfp28/huginnDB/issues"]] },
      ],
      legal: "© 2026 Alex · MIT licensed",
      tagline: "Named after Huginn, Odin's raven — the one who fetches information.",
    },
  },

  es: {
    nav: { features: "Características", mockup: "Vista previa", mcp: "MCP", docs: "Docs", compare: "Comparativa" },
    hero: {
      eyebrow: "Open source · MIT · Tauri + Rust",
      title_a: "El ojo que vigila",
      title_b: "tus bases de datos.",
      lede:
        "HuginnDB es un cliente de escritorio rápido y keyboard-first para PostgreSQL, MySQL, SQLite, MongoDB y SQL Server. Construido alrededor de un editor real — no un visor de tablas glorificado.",
      cta_download: "Descargar",
      cta_github: "Ver en GitHub",
      meta_alpha: "estable",
      meta_platforms: "windows · linux · macos*",
      meta_license: "Licencia MIT",
    },
    compare: {
      eyebrow: "HuginnDB frente a DBeaver, TablePlus, HeidiSQL y DataGrip",
      line: "Editor Monaco completo por celda, credenciales en el keychain del SO, y conector MCP gratis para clientes de IA — mira cómo se comparan los otros cuatro.",
      cta: "Comparativa completa",
      href: "/es/compare/",
      tools: ["HuginnDB", "DBeaver", "TablePlus", "HeidiSQL", "DataGrip"],
    },
    mockup: {
      tag: "Dentro de HuginnDB",
      title: "Cada celda es un editor real. El panel SQL es el mismo editor.",
      sub: "Sin sopa de pop-ups, sin toolbars anidadas. Monaco — el motor de VS Code — hace el trabajo pesado, tanto en la inspección de celdas como en el workspace de queries.",
    },
    why: {
      tag: "Por qué HuginnDB",
      title: "Un alcance más estrecho que los clientes tipo IDE.",
      sub: "La mayoría de GUIs de bases de datos son suites Java pesadas o dashboards web que te pelean en cuanto abres un JSON. HuginnDB elige unas pocas cosas y las hace bien.",
      cards: [
        { n: "01", t: "Inspeccionar celdas, primero", b: "Abre cualquier celda en un editor Monaco completo con detección automática de JSON / XML / SQL, formato, validación en vivo y fullscreen con F11." },
        { n: "02", t: "Un editor SQL de verdad", b: "Autocompletado con conocimiento del esquema, historial de queries por conexión que sobrevive a reinicios, queries guardadas con tags. Ctrl+Enter y listo." },
        { n: "03", t: "Keyboard-first, mínimo cromo", b: "Modo oscuro por defecto. Sin toolbars anidadas, sin sopa de pop-ups. Los atajos que ya usas en tu editor de texto funcionan aquí." },
        { n: "04", t: "Credenciales en el keychain del SO", b: "Las contraseñas nunca tocan disco en texto plano. Credential Manager en Windows, libsecret en Linux, Keychain en macOS. El frontend nunca ve la cadena de conexión." },
        { n: "05", t: "Multi-driver, una UI", b: "PostgreSQL, MySQL, SQLite, MongoDB y SQL Server — cada uno con su diálogo de conexión y los defaults correctos. Las particularidades del driver no estorban." },
        { n: "06", t: "Temas como un editor", b: "Cinco presets integrados más un editor visual de color. Editar un preset lo bifurca en un tema custom — los originales se quedan intactos." },
      ],
    },
    mcp: {
      tag: "IA · Conector MCP",
      title: "Que tu asistente de IA vea el esquema real, no que lo adivine.",
      sub: "huginndb-mcp es un servidor headless de Model Context Protocol que expone las conexiones que ya guardaste en HuginnDB — profiles.json, con contraseñas leídas del keychain del SO — a Claude Code, Claude Desktop, Cursor, Antigravity o Codex. Cualquier cliente MCP compatible con la especificación funciona igual en cuanto le indiques la ruta al binario.",
      panel_note: "Ajustes → MCP en la app resuelve la ruta del binario y genera cada snippet de abajo por ti — elige qué conexiones guardadas exponer, y pega.",
      policies_title: "Nivel de escritura, por conexión",
      policies: [
        { t: "read-only", tone: "ok", d: "Por defecto. Solo SELECT / find / describe — toda herramienta de escritura se rechaza." },
        { t: "data", tone: "warn", d: "Añade INSERT / UPDATE / DELETE a nivel de fila. Sin cambios de esquema." },
        { t: "full", tone: "rose", d: "Añade DDL — CREATE / DROP / ALTER / TRUNCATE." },
      ],
      policies_note: "Se relee de disco en cada intento de escritura — cambia el nivel de una conexión en la app y surte efecto sin reiniciar tu cliente de IA.",
      clients_title: "Configurar un cliente",
      clients: [
        {
          id: "claude-code",
          label: "Claude Code",
          lang: "bash",
          code: "claude mcp add huginndb -s user -- /ruta/a/huginndb-mcp --connections <profile-id>",
          caption: "O escríbelo a mano en ~/.claude.json, o en un .mcp.json de proyecto:",
          code2lang: "json",
          code2: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/ruta/a/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
        },
        {
          id: "claude-desktop",
          label: "Claude Desktop",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/ruta/a/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: "Ajustes → Developer → Edit Config, y reinicia la app.",
        },
        {
          id: "cursor",
          label: "Cursor",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/ruta/a/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: ".cursor/mcp.json (de proyecto) o ~/.cursor/mcp.json (global) — o Ajustes → MCP → Add new global MCP server.",
        },
        {
          id: "antigravity",
          label: "Antigravity",
          lang: "json",
          code: "{\n  \"mcpServers\": {\n    \"huginndb\": {\n      \"command\": \"/ruta/a/huginndb-mcp\",\n      \"args\": [\"--connections\", \"<profile-id>\"]\n    }\n  }\n}",
          caption: "Panel del Agente → menú “…” → MCP Servers → Manage MCP Servers → View raw config.",
        },
        {
          id: "codex",
          label: "Codex CLI",
          lang: "toml",
          code: "[mcp_servers.huginndb]\ncommand = \"/ruta/a/huginndb-mcp\"\nargs = [\"--connections\", \"<profile-id>\"]",
          caption: "~/.codex/config.toml — o: codex mcp add huginndb -- /ruta/a/huginndb-mcp --connections <profile-id>",
        },
      ],
      tools_title: "Herramientas expuestas",
      tools: [
        { t: "list_connections", d: "Qué bases de datos alcanza el servidor, con el nivel de escritura efectivo." },
        { t: "list_tables / describe_table", d: "Tablas, vistas, columnas, tipos, PK/FK, índices." },
        { t: "run_query", d: "SQL o estilo mongosh, controlado por el nivel de escritura." },
        { t: "browse_table", d: "Navega filas por página sin escribir una query." },
        { t: "insert_row / update_cell / delete_rows", d: "Escrituras a nivel de fila, por PK. Requiere data o full." },
        { t: "server_version / list_users", d: "Versión del motor, usuarios y privilegios del servidor." },
      ],
      cta: "Referencia completa en docs/MCP.md",
      copy: "Copiar",
      copied: "Copiado",
    },
    dev: {
      kicker: "Detrás del proyecto",
      name: "Alex · desarrollador solo",
      body:
        "Construí HuginnDB porque cada GUI de BD que probé o me peleaba con columnas JSON o enterraba el editor SQL bajo tres pestañas anidadas. Es open source porque es la única forma honesta de hacer herramientas para devs. Si algo se rompe, abre un issue — lo voy a ver.",
    },
    footer: {
      blurb: "Un cliente de escritorio keyboard-first para bases de datos. Open source, MIT, hecho con Tauri y Rust.",
      cols: [
        { h: "Proyecto", links: [["GitHub", "https://github.com/Alexfp28/huginnDB"], ["Releases", "https://github.com/Alexfp28/huginnDB/releases"], ["Comparativa", "/es/compare/"], ["Roadmap", "https://github.com/Alexfp28/huginnDB#roadmap"]] },
        { h: "Docs", links: [["README", "https://github.com/Alexfp28/huginnDB#readme"], ["Conector MCP", "https://github.com/Alexfp28/huginnDB/blob/main/docs/MCP.es.md"], ["Contribuir", "https://github.com/Alexfp28/huginnDB/blob/main/CONTRIBUTING.md"], ["Seguridad", "https://github.com/Alexfp28/huginnDB/blob/main/SECURITY.md"], ["Licencia", "https://github.com/Alexfp28/huginnDB/blob/main/LICENSE"]] },
        { h: "Autor", links: [["shion.es", "https://shion.es"], ["Perfil GitHub", "https://github.com/Alexfp28"], ["Reportar un issue", "https://github.com/Alexfp28/huginnDB/issues"]] },
      ],
      legal: "© 2026 Alex · Licencia MIT",
      tagline: "Llamado así por Huginn, el cuervo de Odín — el que busca información.",
    },
  },
};

window.COPY = COPY;
