import { jsxs as r, jsx as e } from "react/jsx-runtime";
import { useState as b } from "react";
import { Link as L } from "react-router-dom";
import { useTranslation as D } from "react-i18next";
import { ArrowLeft as U, Palette as v, ChevronRight as f, Sparkles as m, Layers as p, Upload as y, Trash2 as u, Check as n, Plus as N, Eye as h, Download as B, Copy as w, Pencil as k, Save as R, EyeOff as C, RotateCcw as A, Power as K, HelpCircle as q, Code2 as G, ChevronDown as O, Info as I } from "lucide-react";
const z = [
  { id: "dark", name: "Dark", builtin: !0, accent: "indigo", accentHex: "#6366f1", active: !0 },
  { id: "light", name: "Light", builtin: !0, accent: "emerald", accentHex: "#10b981", active: !0 },
  { id: "corporate", name: "Corporate", builtin: !1, accent: "navy", accentHex: "#1e40af", active: !0 }
], V = [
  {
    theme: { name: "Dark", builtin: !0 },
    presets: [
      { id: "p1", name: "Indigo", accentHex: "#6366f1", accentKey: "indigo", scope: "Platform", active: !0, builtin: !0 },
      { id: "p2", name: "Violet", accentHex: "#8b5cf6", accentKey: "violet", scope: "Platform", active: !0, builtin: !1 }
    ]
  },
  {
    theme: { name: "Light", builtin: !0 },
    presets: [
      { id: "p3", name: "Emerald", accentHex: "#10b981", accentKey: "emerald", scope: "Platform", active: !0, builtin: !0 }
    ]
  },
  {
    theme: { name: "Corporate", builtin: !1 },
    presets: [
      { id: "p4", name: "Navy", accentHex: "#1e40af", accentKey: "navy", scope: "Tenant", active: !1, builtin: !1 }
    ]
  }
], F = [
  { key: "indigo", hex: "#6366f1" },
  { key: "violet", hex: "#8b5cf6" },
  { key: "purple", hex: "#a855f7" },
  { key: "rose", hex: "#f43f5e" },
  { key: "pink", hex: "#ec4899" },
  { key: "amber", hex: "#f59e0b" },
  { key: "orange", hex: "#f97316" },
  { key: "teal", hex: "#14b8a6" },
  { key: "emerald", hex: "#10b981" },
  { key: "cyan", hex: "#06b6d4" },
  { key: "sky", hex: "#0ea5e9" },
  { key: "blue", hex: "#3b82f6" },
  { key: "navy", hex: "#1e40af" },
  { key: "slate", hex: "#475569" }
], T = { app: "#161618", primary: "#1c1c1f", secondary: "#232326", card: "#1c1c1f" }, W = ["identity", "colors", "status", "categories", "dashboard", "typography", "spacing", "logos", "access"], P = ["identity", "accent", "backgrounds", "dashboard", "typography", "spacing", "activation"], _ = [
  { key: "app", hex: "#161618" },
  { key: "primary", hex: "#1c1c1f" },
  { key: "secondary", hex: "#232326" },
  { key: "card", hex: "#1c1c1f" },
  { key: "hover", hex: "#27272a" }
], J = [
  { key: "success", hex: "#14b8a6" },
  { key: "warning", hex: "#f59e0b" },
  { key: "error", hex: "#f43f5e" },
  { key: "info", hex: "#0ea5e9" }
], x = ["#6366f1", "#8b5cf6", "#ec4899", "#f59e0b", "#10b981", "#0ea5e9"], M = [
  { key: "cat1", hex: "#6366f1" },
  { key: "cat2", hex: "#8b5cf6" },
  { key: "cat3", hex: "#ec4899" },
  { key: "cat4", hex: "#f59e0b" },
  { key: "cat5", hex: "#10b981" },
  { key: "cat6", hex: "#0ea5e9" },
  { key: "cat7", hex: "#f43f5e" },
  { key: "cat8", hex: "#14b8a6" }
], Q = [
  {
    titleKey: "techRef.groupBranding",
    endpoints: [
      { method: "GET", path: "/api/administration/uiconfiguration" },
      { method: "PUT", path: "/api/administration/uiconfiguration/identity" },
      { method: "PUT", path: "/api/administration/uiconfiguration/defaults" },
      { method: "PUT", path: "/api/administration/uiconfiguration/user-permissions" },
      { method: "POST", path: "/api/administration/uiconfiguration/{logo|favicon}" },
      { method: "DELETE", path: "/api/administration/uiconfiguration/{logo|favicon}" }
    ]
  },
  {
    titleKey: "techRef.groupThemes",
    endpoints: [
      { method: "GET", path: "/api/administration/uiconfiguration/themes" },
      { method: "POST", path: "/api/administration/uiconfiguration/themes" },
      { method: "PUT", path: "/api/administration/uiconfiguration/themes/{id}" },
      { method: "DELETE", path: "/api/administration/uiconfiguration/themes/{id}" },
      { method: "POST", path: "/api/administration/uiconfiguration/themes/{id}/disabled" },
      { method: "PUT", path: "/api/administration/uiconfiguration/themes/{id}/tenants" },
      { method: "GET", path: "/api/administration/uiconfiguration/themes/{id}/export" },
      { method: "POST", path: "/api/administration/uiconfiguration/themes/import" }
    ]
  },
  {
    titleKey: "techRef.groupPresets",
    endpoints: [
      { method: "GET", path: "/api/administration/uiconfiguration/presets" },
      { method: "POST", path: "/api/administration/uiconfiguration/presets" },
      { method: "POST", path: "/api/administration/uiconfiguration/presets/duplicate" },
      { method: "PUT", path: "/api/administration/uiconfiguration/presets/{id}" },
      { method: "DELETE", path: "/api/administration/uiconfiguration/presets/{id}" },
      { method: "POST", path: "/api/administration/uiconfiguration/presets/{id}/disabled" }
    ]
  }
], X = ["br001", "br002", "br003", "br004", "br005", "br006", "br007", "br008"], Y = {
  GET: "bg-[var(--info-bg)] text-[var(--info-text)] border-[var(--info-border)]",
  PUT: "bg-[var(--warning-bg)] text-[var(--warning-text)] border-[var(--warning-border)]",
  POST: "bg-[var(--success-bg)] text-[var(--success-text)] border-[var(--success-border)]",
  DELETE: "bg-[var(--error-bg)] text-[var(--error-text)] border-[var(--error-border)]"
};
function d({ children: a }) {
  return /* @__PURE__ */ r("div", { className: "flex items-start gap-2 px-3 py-2 rounded-md border-l-2 border-[var(--color-accent-500)] bg-[var(--bg-secondary)] text-xs text-[var(--text-secondary)]", children: [
    /* @__PURE__ */ e(I, { className: "w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-[var(--text-tertiary)]" }),
    /* @__PURE__ */ e("span", { className: "leading-relaxed", children: a })
  ] });
}
function o({ n: a, children: l }) {
  return /* @__PURE__ */ r("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
    /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: a }),
    l
  ] });
}
function se() {
  const { t: a } = D("docsAdministrationUiconfiguration"), [l, S] = b("identity"), [c, j] = b("colors"), [i, E] = b("identity"), [g, $] = b(!1), H = [
    { id: "identity", key: "identity.tabLabel" },
    { id: "logos", key: "logos.tabLabel" },
    { id: "defaults", key: "defaults.tabLabel" },
    { id: "permissions", key: "permissions.tabLabel" }
  ];
  return /* @__PURE__ */ r("div", { className: "space-y-8 max-w-5xl mx-auto pb-12", children: [
    /* @__PURE__ */ r(
      L,
      {
        to: "/system/docs/user",
        className: "inline-flex items-center gap-1.5 text-sm text-[var(--color-accent-500)] hover:text-[var(--color-accent-600)] transition-colors",
        children: [
          /* @__PURE__ */ e(U, { className: "h-4 w-4" }),
          a("nav.backToAdministration")
        ]
      }
    ),
    /* @__PURE__ */ r("div", { children: [
      /* @__PURE__ */ r("div", { className: "flex items-center gap-3 mb-3", children: [
        /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-[var(--color-accent-600)]/10", children: /* @__PURE__ */ e(v, { className: "h-6 w-6 text-[var(--color-accent-600)]" }) }),
        /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-[var(--text-primary)]", children: a("title") })
      ] }),
      /* @__PURE__ */ e("p", { className: "text-xl text-[var(--color-accent-600)] font-medium mb-1", children: a("summary") }),
      /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mb-3", children: a("subtitle") }),
      /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-3 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ r("span", { children: [
          "5 ",
          a("header.pages")
        ] }),
        /* @__PURE__ */ e("span", { children: "·" }),
        /* @__PURE__ */ r("span", { children: [
          "20 ",
          a("header.apiEndpoints")
        ] }),
        /* @__PURE__ */ e("span", { children: "·" }),
        /* @__PURE__ */ r("span", { children: [
          "8 ",
          a("header.businessRules")
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 1, children: a("sections.objective") }),
      /* @__PURE__ */ e("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] p-4 bg-[var(--bg-card)]", children: /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] leading-relaxed", children: a("objective") }) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 2, children: a("sections.access") }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] p-4 bg-[var(--bg-card)] space-y-3", children: [
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-secondary)] mb-2", children: a("access.navigation") }),
          /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--color-accent-600)]/10 text-[var(--color-accent-700)] font-medium", children: "Administration" }),
            /* @__PURE__ */ e(f, { className: "h-3.5 w-3.5 text-[var(--text-tertiary)]" }),
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--color-accent-600)]/10 text-[var(--color-accent-700)] font-medium", children: a("access.module") })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-2 text-xs", children: [
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] font-mono text-[var(--text-secondary)]", children: "/administration/uiconfiguration" }),
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] font-mono text-[var(--text-secondary)]", children: "…/themes" }),
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] font-mono text-[var(--text-secondary)]", children: "…/presets" }),
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-[var(--color-accent-600)]/10 border border-[var(--color-accent-600)]/20 text-[var(--color-accent-700)] font-mono", children: a("access.permission") })
        ] }),
        /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-tertiary)]", children: a("access.note") })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 3, children: a("sections.architecture") }),
      /* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: [
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-2", children: [
            /* @__PURE__ */ e(v, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("architecture.branding.title") })
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a("architecture.branding.description") })
        ] }),
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-2", children: [
            /* @__PURE__ */ e(m, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("architecture.theme.title") })
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a("architecture.theme.description") })
        ] }),
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-2", children: [
            /* @__PURE__ */ e(p, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("architecture.preset.title") })
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a("architecture.preset.description") })
        ] })
      ] }),
      /* @__PURE__ */ r("div", { className: "mt-3 p-4 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: [
          /* @__PURE__ */ r("span", { className: "px-2 py-1 rounded bg-[var(--color-accent-600)]/10 text-[var(--color-accent-700)] font-medium inline-flex items-center gap-1", children: [
            /* @__PURE__ */ e(m, { className: "w-3 h-3" }),
            " ",
            a("architecture.hierarchy.theme")
          ] }),
          /* @__PURE__ */ e(f, { className: "h-3.5 w-3.5 text-[var(--text-tertiary)]" }),
          /* @__PURE__ */ r("span", { className: "px-2 py-1 rounded bg-[var(--bg-card)] border border-[var(--border-color)] text-[var(--text-secondary)] inline-flex items-center gap-1", children: [
            /* @__PURE__ */ e(p, { className: "w-3 h-3" }),
            " ",
            a("architecture.hierarchy.preset"),
            " A"
          ] }),
          /* @__PURE__ */ r("span", { className: "px-2 py-1 rounded bg-[var(--bg-card)] border border-[var(--border-color)] text-[var(--text-secondary)] inline-flex items-center gap-1", children: [
            /* @__PURE__ */ e(p, { className: "w-3 h-3" }),
            " ",
            a("architecture.hierarchy.preset"),
            " B"
          ] })
        ] }),
        /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-tertiary)] mt-2", children: a("architecture.hierarchy.note") })
      ] }),
      /* @__PURE__ */ e("div", { className: "mt-3", children: /* @__PURE__ */ e(d, { children: a("architecture.annotation") }) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 4, children: a("sections.branding") }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center gap-3", children: [
          /* @__PURE__ */ e(v, { className: "h-5 w-5 text-[var(--color-accent-600)]" }),
          /* @__PURE__ */ r("div", { children: [
            /* @__PURE__ */ e("div", { className: "text-sm font-bold text-[var(--text-primary)]", children: a("branding.pageTitle") }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)]", children: a("branding.pageSubtitle") })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { className: "p-4 space-y-4", children: [
          /* @__PURE__ */ e("div", { className: "flex gap-6 border-b border-[var(--border-color)] overflow-x-auto", children: H.map((t) => /* @__PURE__ */ e(
            "button",
            {
              type: "button",
              onClick: () => S(t.id),
              className: [
                "py-2 text-xs font-medium whitespace-nowrap border-b-2 -mb-px transition-colors",
                l === t.id ? "text-[var(--text-primary)] border-[var(--color-accent-500)]" : "text-[var(--text-muted)] border-transparent hover:text-[var(--text-secondary)]"
              ].join(" "),
              children: a(t.key)
            },
            t.id
          )) }),
          l === "identity" && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
            /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: ["displayName", "tagline", "subdomain"].map((t) => /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
              /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a(`identity.${t}`) }),
              /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-sm text-[var(--text-muted)]", children: t === "subdomain" ? "acme" : t === "displayName" ? "SmartStack" : "Votre plateforme de gestion" })
            ] }, t)) }),
            /* @__PURE__ */ e(d, { children: a("identity.annotations.displayName") }),
            /* @__PURE__ */ e(d, { children: a("identity.annotations.subdomain") })
          ] }),
          l === "logos" && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
            /* @__PURE__ */ r("div", { className: "flex items-start gap-4 p-4 rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)]", children: [
              /* @__PURE__ */ r("div", { className: "flex-1 min-w-0 space-y-2", children: [
                /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("logos.logo") }),
                /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)]", children: a("logos.logoHint") }),
                /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
                  /* @__PURE__ */ r("span", { className: "px-3 py-1.5 text-xs rounded-[var(--radius-button)] bg-[var(--color-accent-500)] text-white inline-flex items-center gap-1", children: [
                    /* @__PURE__ */ e(y, { className: "w-3.5 h-3.5" }),
                    a("logos.uploadButton")
                  ] }),
                  /* @__PURE__ */ r("span", { className: "px-3 py-1.5 text-xs rounded-[var(--radius-button)] bg-[var(--error-bg)] text-[var(--error-text)] border border-[var(--error-border)] inline-flex items-center gap-1", children: [
                    /* @__PURE__ */ e(u, { className: "w-3.5 h-3.5" }),
                    a("logos.deleteButton")
                  ] })
                ] })
              ] }),
              /* @__PURE__ */ e("div", { className: "flex-shrink-0 flex items-center justify-center rounded-[var(--radius-card)] bg-[var(--bg-primary)] border border-[var(--border-color)] px-4", style: { minWidth: 120, height: 48 }, children: /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--color-accent-600)]", children: "SmartStack" }) })
            ] }),
            /* @__PURE__ */ e(d, { children: a("logos.annotations.logo") })
          ] }),
          l === "defaults" && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
            /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
              /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("defaults.defaultTheme") }),
                /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-sm text-[var(--text-muted)]", children: "Dark (built-in)" })
              ] }),
              /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("defaults.defaultPreset") }),
                /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-sm text-[var(--text-muted)]", children: "Indigo" })
              ] })
            ] }),
            /* @__PURE__ */ e(d, { children: a("defaults.annotations.theme") })
          ] }),
          l === "permissions" && /* @__PURE__ */ r("div", { className: "space-y-3", children: [
            /* @__PURE__ */ e("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-2", children: ["canUsersChangeTheme", "canUsersChangePreset", "canUsersCreatePresets", "allowUserCustomization"].map((t) => /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e("span", { className: "w-4 h-4 rounded-sm bg-[var(--color-accent-500)] flex items-center justify-center", children: /* @__PURE__ */ e(n, { className: "w-3 h-3 text-white" }) }),
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-primary)]", children: a(`permissions.${t}`) })
            ] }, t)) }),
            /* @__PURE__ */ e(d, { children: a("permissions.annotations.global") })
          ] })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 5, children: a("sections.themes") }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden bg-[var(--bg-card)] shadow-sm mb-4", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between gap-3", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-3 min-w-0", children: [
            /* @__PURE__ */ e(m, { className: "h-5 w-5 text-[var(--color-accent-600)] flex-shrink-0" }),
            /* @__PURE__ */ r("div", { className: "min-w-0", children: [
              /* @__PURE__ */ e("div", { className: "text-sm font-bold text-[var(--text-primary)]", children: a("themes.listTitle") }),
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] truncate", children: a("themes.listSubtitle") })
            ] })
          ] }),
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1.5 text-xs rounded-[var(--radius-button)] border border-[var(--border-color)] bg-[var(--bg-card)] text-[var(--text-primary)] inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e(y, { className: "w-3.5 h-3.5" }),
              a("themes.import")
            ] }),
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1.5 text-xs rounded-[var(--radius-button)] bg-[var(--color-accent-500)] text-white inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e(N, { className: "w-3.5 h-3.5" }),
              a("themes.create")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ r("table", { className: "w-full text-xs", children: [
          /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { className: "border-b border-[var(--border-color)] bg-[var(--bg-tertiary)] text-[var(--text-muted)]", children: [
            /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-semibold uppercase tracking-wider w-10" }),
            /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-semibold uppercase tracking-wider", children: a("themes.colName") }),
            /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-semibold uppercase tracking-wider", children: a("themes.colAccent") }),
            /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-semibold uppercase tracking-wider", children: a("themes.colState") }),
            /* @__PURE__ */ e("th", { className: "px-3 py-2 text-right font-semibold uppercase tracking-wider", children: a("themes.colActions") })
          ] }) }),
          /* @__PURE__ */ e("tbody", { children: z.map((t) => /* @__PURE__ */ r("tr", { className: "border-b border-[var(--border-color)]", children: [
            /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-7 h-7 rounded-[var(--radius-card)]", style: { backgroundColor: t.accentHex }, children: /* @__PURE__ */ e(m, { className: "w-3.5 h-3.5 text-white" }) }) }),
            /* @__PURE__ */ r("td", { className: "px-3 py-2", children: [
              /* @__PURE__ */ e("span", { className: "font-medium text-[var(--text-primary)]", children: t.name }),
              t.builtin && /* @__PURE__ */ e("span", { className: "ml-2 text-[9px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-[var(--bg-primary)] text-[var(--text-muted)] border border-[var(--border-color)] font-bold", children: "Built-in" })
            ] }),
            /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e("code", { className: "font-mono text-[var(--text-muted)]", children: t.accent }) }),
            /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider rounded bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]", children: [
              /* @__PURE__ */ e(n, { className: "w-3 h-3" }),
              a("themes.activeLabel")
            ] }) }),
            /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-end gap-1 text-[var(--text-muted)]", children: [
              /* @__PURE__ */ e(h, { className: "w-3.5 h-3.5" }),
              /* @__PURE__ */ e(B, { className: "w-3.5 h-3.5" }),
              /* @__PURE__ */ e(w, { className: "w-3.5 h-3.5" }),
              /* @__PURE__ */ e(k, { className: "w-3.5 h-3.5" }),
              !t.builtin && /* @__PURE__ */ e(u, { className: "w-3.5 h-3.5" })
            ] }) })
          ] }, t.id)) })
        ] })
      ] }),
      /* @__PURE__ */ r("div", { className: "space-y-2 mb-6", children: [
        /* @__PURE__ */ e(d, { children: a("themes.annotations.builtin") }),
        /* @__PURE__ */ e(d, { children: a("themes.annotations.actions") })
      ] }),
      /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-2", children: a("themes.editorTitle") }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between gap-3", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 min-w-0", children: [
            /* @__PURE__ */ e(m, { className: "h-4 w-4 text-[var(--color-accent-600)] flex-shrink-0" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-bold text-[var(--text-primary)] truncate", children: "Corporate" })
          ] }),
          /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
            /* @__PURE__ */ r("span", { className: "px-2 py-1 text-[10px] rounded bg-[var(--warning-bg)] text-[var(--warning-text)] border border-[var(--warning-border)] inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--warning-dot)]" }),
              a("themes.dirty")
            ] }),
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1 text-xs rounded-[var(--radius-button)] bg-[var(--color-accent-500)] text-white inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e(R, { className: "w-3.5 h-3.5" }),
              a("themes.save")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "px-4 pt-3 flex gap-4 border-b border-[var(--border-color)] overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: W.map((t) => /* @__PURE__ */ e(
          "button",
          {
            type: "button",
            onClick: () => j(t),
            className: [
              "pb-2 text-xs font-medium whitespace-nowrap border-b-2 -mb-px transition-colors",
              c === t ? "text-[var(--text-primary)] border-[var(--color-accent-500)]" : "text-[var(--text-muted)] border-transparent hover:text-[var(--text-secondary)]"
            ].join(" "),
            children: a(`themes.tabs.${t}`)
          },
          t
        )) }),
        /* @__PURE__ */ r("div", { className: "grid md:grid-cols-2 gap-4 p-4", children: [
          /* @__PURE__ */ r("div", { className: "min-w-0 space-y-3", children: [
            c === "colors" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3 space-y-2", children: [
              /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("themes.colors.surfaces") }),
              /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: _.map((t) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1", children: [
                /* @__PURE__ */ e("span", { className: "w-9 h-9 rounded-[var(--radius-card)] border border-[var(--border-color)]", style: { backgroundColor: t.hex } }),
                /* @__PURE__ */ e("span", { className: "text-[9px] text-[var(--text-muted)] font-mono", children: t.key })
              ] }, t.key)) })
            ] }),
            c === "status" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3 space-y-2", children: [
              /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("themes.tabs.status") }),
              /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: J.map((t) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1", children: [
                /* @__PURE__ */ e("span", { className: "w-9 h-9 rounded-[var(--radius-card)] border border-[var(--border-color)]", style: { backgroundColor: t.hex } }),
                /* @__PURE__ */ e("span", { className: "text-[9px] text-[var(--text-muted)] font-mono", children: t.key })
              ] }, t.key)) })
            ] }),
            c === "dashboard" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3 space-y-2", children: [
              /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("themes.dashboard.palette") }),
              /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: x.map((t, s) => /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-[var(--radius-card)] border border-[var(--border-color)]", style: { backgroundColor: t } }, s)) })
            ] }),
            c === "identity" && /* @__PURE__ */ r("div", { className: "space-y-2", children: [
              /* @__PURE__ */ r("div", { className: "flex items-center gap-3 rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3", children: [
                /* @__PURE__ */ e("span", { className: "w-9 h-9 rounded-[var(--radius-card)] bg-[var(--color-accent-600)]/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(m, { className: "w-4 h-4 text-[var(--color-accent-600)]" }) }),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[var(--text-primary)]", children: "Corporate" })
              ] }),
              /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3 space-y-2", children: [
                /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("themes.colorSources.title") }),
                /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: [...x, "#f43f5e", "#0ea5e9"].map((t, s) => /* @__PURE__ */ e("span", { className: `w-6 h-6 rounded-full border-2 ${s === 0 ? "border-[var(--text-primary)]" : "border-[var(--border-color)]"}`, style: { backgroundColor: t } }, t)) }),
                /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-[var(--radius-button)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-[var(--text-secondary)]", children: a("themes.colorSources.generate") })
              ] })
            ] }),
            c === "categories" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3 space-y-2", children: [
              /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("themes.categories.title") }),
              /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-2", children: M.map((t) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1", children: [
                /* @__PURE__ */ e("span", { className: "w-9 h-9 rounded-[var(--radius-card)] border border-[var(--border-color)]", style: { backgroundColor: t.hex } }),
                /* @__PURE__ */ e("span", { className: "text-[9px] text-[var(--text-muted)] font-mono", children: t.key })
              ] }, t.key)) })
            ] }),
            (c === "typography" || c === "spacing" || c === "logos" || c === "access") && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-3", children: [
              /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)] mb-1", children: a(`themes.tabs.${c}`) }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a(`themes.tabHints.${c}`) })
            ] })
          ] }),
          /* @__PURE__ */ r("div", { className: "min-w-0", children: [
            /* @__PURE__ */ r("div", { className: "text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1.5 flex items-center gap-1", children: [
              /* @__PURE__ */ e(h, { className: "w-3 h-3" }),
              a("themes.livePreview")
            ] }),
            /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] overflow-hidden", style: { backgroundColor: "#1c1c1f" }, children: [
              /* @__PURE__ */ r("div", { className: "px-3 py-2 flex items-center gap-2", style: { backgroundColor: "#232326" }, children: [
                /* @__PURE__ */ e("span", { className: "w-2.5 h-2.5 rounded-full", style: { backgroundColor: "#1e40af" } }),
                /* @__PURE__ */ e("span", { className: "text-xs font-semibold", style: { color: "#fafafa" }, children: "Corporate" })
              ] }),
              /* @__PURE__ */ r("div", { className: "p-3 space-y-2", children: [
                /* @__PURE__ */ e("div", { className: "h-2 rounded w-3/4", style: { backgroundColor: "#3f3f46" } }),
                /* @__PURE__ */ e("div", { className: "h-2 rounded w-1/2", style: { backgroundColor: "#2a2a2e" } }),
                /* @__PURE__ */ r("div", { className: "flex gap-1.5 pt-1", children: [
                  /* @__PURE__ */ e("span", { className: "px-2 py-1 rounded text-[10px] font-medium text-white", style: { backgroundColor: "#1e40af" }, children: a("themes.previewButton") }),
                  /* @__PURE__ */ e("span", { className: "px-2 py-1 rounded text-[10px]", style: { backgroundColor: "#2a2a2e", color: "#d4d4d8" }, children: a("themes.previewSecondary") })
                ] })
              ] })
            ] })
          ] })
        ] })
      ] }),
      /* @__PURE__ */ r("div", { className: "space-y-2 mt-3", children: [
        /* @__PURE__ */ e(d, { children: a("themes.annotations.editor") }),
        /* @__PURE__ */ e(d, { children: a("themes.annotations.preview") }),
        /* @__PURE__ */ e(d, { children: a("themes.annotations.identity") }),
        /* @__PURE__ */ e(d, { children: a("themes.annotations.categories") })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 6, children: a("sections.presets") }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden bg-[var(--bg-card)] shadow-sm mb-4", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center gap-3", children: [
          /* @__PURE__ */ e(p, { className: "h-5 w-5 text-[var(--color-accent-600)]" }),
          /* @__PURE__ */ r("div", { children: [
            /* @__PURE__ */ e("div", { className: "text-sm font-bold text-[var(--text-primary)]", children: a("presets.listTitle") }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)]", children: a("presets.listSubtitle") })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "divide-y divide-[var(--border-color)]", children: V.map((t) => /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-3 px-4 py-2.5 bg-[var(--bg-secondary)]", children: [
            /* @__PURE__ */ r("div", { className: "flex items-center gap-2 min-w-0", children: [
              /* @__PURE__ */ e(m, { className: "w-4 h-4 text-[var(--color-accent-600)] flex-shrink-0" }),
              /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)] truncate", children: t.theme.name }),
              t.theme.builtin && /* @__PURE__ */ e("span", { className: "text-[9px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-[var(--bg-primary)] text-[var(--text-muted)] border border-[var(--border-color)] font-bold", children: "Built-in" }),
              /* @__PURE__ */ r("span", { className: "text-xs text-[var(--text-muted)]", children: [
                t.presets.length,
                " ",
                a("presets.presetsCount")
              ] })
            ] }),
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1.5 text-xs rounded-[var(--radius-button)] bg-[var(--color-accent-500)] text-white inline-flex items-center gap-1 flex-shrink-0", children: [
              /* @__PURE__ */ e(N, { className: "w-3.5 h-3.5" }),
              a("presets.create")
            ] })
          ] }),
          /* @__PURE__ */ e("table", { className: "w-full text-xs", children: /* @__PURE__ */ e("tbody", { children: t.presets.map((s) => /* @__PURE__ */ r("tr", { className: "border-t border-[var(--border-color)] hover:bg-[var(--bg-secondary)] cursor-pointer", children: [
            /* @__PURE__ */ e("td", { className: "px-4 py-2.5 w-10", children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-8 h-8 rounded-[var(--radius-card)]", style: { backgroundColor: s.accentHex }, children: /* @__PURE__ */ e(p, { className: "w-4 h-4 text-white" }) }) }),
            /* @__PURE__ */ e("td", { className: "px-2 py-2.5 min-w-0", children: /* @__PURE__ */ r("div", { className: "font-medium text-[var(--text-primary)] flex items-center gap-2 flex-wrap", children: [
              s.name,
              s.builtin && /* @__PURE__ */ e("span", { className: "text-[9px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-[var(--bg-primary)] text-[var(--text-muted)] border border-[var(--border-color)]", children: "Built-in" })
            ] }) }),
            /* @__PURE__ */ e("td", { className: "px-2 py-2.5", children: /* @__PURE__ */ e("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider rounded border ${s.scope === "Tenant" ? "bg-[var(--color-accent-600)]/10 text-[var(--color-accent-700)] border-[var(--color-accent-600)]/20" : "bg-[var(--bg-primary)] text-[var(--text-muted)] border-[var(--border-color)]"}`, children: s.scope === "Tenant" ? a("presets.scopeTenant") : a("presets.scopePlatform") }) }),
            /* @__PURE__ */ e("td", { className: "px-2 py-2.5", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
              /* @__PURE__ */ e("span", { className: "w-5 h-5 rounded-md flex-shrink-0 border border-[var(--border-color)]", style: { backgroundColor: s.accentHex } }),
              /* @__PURE__ */ e("code", { className: "font-mono text-[var(--text-muted)]", children: s.accentKey })
            ] }) }),
            /* @__PURE__ */ e("td", { className: "px-2 py-2.5", children: s.active ? /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider rounded bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]", children: [
              /* @__PURE__ */ e(n, { className: "w-3 h-3" }),
              a("themes.activeLabel")
            ] }) : /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider rounded bg-[var(--bg-primary)] text-[var(--text-muted)] border border-[var(--border-color)]", children: [
              /* @__PURE__ */ e(C, { className: "w-3 h-3" }),
              a("presets.disabledLabel")
            ] }) }),
            /* @__PURE__ */ e("td", { className: "px-3 py-2.5", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-end gap-1 text-[var(--text-muted)]", children: [
              /* @__PURE__ */ e(h, { className: "w-3.5 h-3.5" }),
              /* @__PURE__ */ e(w, { className: "w-3.5 h-3.5" }),
              /* @__PURE__ */ e(k, { className: "w-3.5 h-3.5" }),
              !s.builtin && /* @__PURE__ */ e(u, { className: "w-3.5 h-3.5" })
            ] }) })
          ] }, s.id)) }) })
        ] }, t.theme.name)) })
      ] }),
      /* @__PURE__ */ r("div", { className: "mb-6 space-y-2", children: [
        /* @__PURE__ */ e(d, { children: a("presets.annotations.list") }),
        /* @__PURE__ */ e(d, { children: a("presets.annotations.themeGrouping") })
      ] }),
      /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-2", children: a("presets.editorTitle") }),
      /* @__PURE__ */ r("div", { className: "mb-4 p-4 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ e("div", { className: "text-xs font-semibold text-[var(--text-primary)] uppercase tracking-wide mb-3", children: a("presets.tabsRefTitle") }),
        /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2.5", children: P.map((t, s) => /* @__PURE__ */ r("div", { className: "flex items-start gap-2.5 p-3 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ e("span", { className: "flex-shrink-0 w-6 h-6 rounded-full bg-[var(--color-accent-600)] text-white flex items-center justify-center text-[10px] font-bold", children: s + 1 }),
          /* @__PURE__ */ r("div", { className: "min-w-0", children: [
            /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-primary)]", children: a(`presets.tabs.${t}`) }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] leading-relaxed mt-0.5", children: a(`presets.tabHints.${t}`) })
          ] })
        ] }, t)) })
      ] }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between gap-3", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-3 min-w-0", children: [
            /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-[var(--radius-card)] flex items-center justify-center flex-shrink-0", style: { backgroundColor: "#6366f1" }, children: /* @__PURE__ */ e(p, { className: "w-4 h-4 text-white" }) }),
            /* @__PURE__ */ r("div", { className: "min-w-0", children: [
              /* @__PURE__ */ e("div", { className: "text-sm font-bold text-[var(--text-primary)] truncate", children: "Indigo" }),
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)]", children: "Dark" })
            ] })
          ] }),
          /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
            /* @__PURE__ */ r("span", { className: "hidden sm:inline-flex items-center gap-1.5 px-2 py-1 text-xs font-medium rounded bg-[var(--warning-bg)] text-[var(--warning-text)] border border-[var(--warning-border)]", children: [
              /* @__PURE__ */ e("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--warning-dot)]" }),
              a("presets.dirty")
            ] }),
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1 text-xs rounded-[var(--radius-button)] bg-[var(--bg-card)] border border-[var(--border-color)] text-[var(--text-secondary)] inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e(A, { className: "w-3.5 h-3.5" }),
              a("presets.resetButton")
            ] }),
            /* @__PURE__ */ r("span", { className: "px-2.5 py-1 text-xs rounded-[var(--radius-button)] bg-[var(--color-accent-500)] text-white inline-flex items-center gap-1", children: [
              /* @__PURE__ */ e(n, { className: "w-3.5 h-3.5" }),
              a("themes.save")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "px-4 pt-3 flex gap-4 border-b border-[var(--border-color)] overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: P.map((t) => /* @__PURE__ */ e(
          "button",
          {
            type: "button",
            onClick: () => E(t),
            className: [
              "pb-2 text-xs font-medium whitespace-nowrap border-b-2 -mb-px transition-colors",
              i === t ? "text-[var(--text-primary)] border-[var(--color-accent-500)]" : "text-[var(--text-muted)] border-transparent hover:text-[var(--text-secondary)]"
            ].join(" "),
            children: a(`presets.tabs.${t}`)
          },
          t
        )) }),
        /* @__PURE__ */ e("div", { className: "p-4", children: i === "activation" ? (
          /* Activation tab — full width */
          /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-5 space-y-4", children: [
            /* @__PURE__ */ r("div", { children: [
              /* @__PURE__ */ r("h3", { className: "text-sm font-semibold text-[var(--text-primary)] flex items-center gap-2", children: [
                /* @__PURE__ */ e(K, { className: "w-4 h-4" }),
                a("presets.activationTitle")
              ] }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-1", children: a("presets.activationHint") })
            ] }),
            /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-4 p-4 rounded-[var(--radius-card)] bg-[var(--bg-primary)] border border-[var(--border-color)]", children: [
              /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium uppercase tracking-wider rounded bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]", children: [
                /* @__PURE__ */ e(n, { className: "w-3.5 h-3.5" }),
                a("themes.activeLabel")
              ] }),
              /* @__PURE__ */ r("span", { className: "flex items-center gap-1.5 px-3 py-2 rounded-[var(--radius-button)] text-xs font-medium bg-[var(--bg-secondary)] text-[var(--text-primary)] border border-[var(--border-color)]", children: [
                /* @__PURE__ */ e(C, { className: "w-4 h-4" }),
                a("presets.disableAction")
              ] })
            ] }),
            /* @__PURE__ */ e(d, { children: a("presets.annotations.activation") })
          ] })
        ) : (
          /* All other tabs — 2-column: form + live preview */
          /* @__PURE__ */ r("div", { className: "grid md:grid-cols-2 gap-6", children: [
            /* @__PURE__ */ r("div", { className: "min-w-0 space-y-4", children: [
              i === "identity" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-4", children: [
                /* @__PURE__ */ r("div", { className: "grid grid-cols-[auto_1fr] gap-4 items-end", children: [
                  /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                    /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("presets.fieldIcon") }),
                    /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: ["#6366f1", "#8b5cf6", "#10b981", "#f59e0b", "#f43f5e", "#0ea5e9"].map((t, s) => /* @__PURE__ */ e("span", { className: `w-9 h-9 rounded-[var(--radius-card)] flex items-center justify-center cursor-pointer ${s === 0 ? "ring-2 ring-offset-1 ring-[var(--color-accent-500)]" : ""}`, style: { backgroundColor: t }, children: /* @__PURE__ */ e(p, { className: "w-4 h-4 text-white" }) }, s)) })
                  ] }),
                  /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                    /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("presets.fieldName") }),
                    /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-sm text-[var(--text-primary)]", children: "Indigo" })
                  ] })
                ] }),
                /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                  /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("presets.fieldDescription") }),
                  /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-xs text-[var(--text-muted)] min-h-[3rem]", children: "Preset indigo par défaut" })
                ] }),
                /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
                  /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-primary)]", children: a("presets.fieldParentTheme") }),
                  /* @__PURE__ */ r("div", { className: "w-full px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-sm text-[var(--text-muted)] opacity-60 cursor-not-allowed flex items-center justify-between", children: [
                    /* @__PURE__ */ e("span", { children: "Dark" }),
                    /* @__PURE__ */ e("span", { className: "text-[10px]", children: "▾" })
                  ] }),
                  /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-muted)]", children: a("presets.parentLocked") })
                ] }),
                /* @__PURE__ */ r("div", { className: "flex items-center gap-2 px-3 py-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)]", children: [
                  /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--text-muted)]", children: a("presets.scopeField") }),
                  /* @__PURE__ */ e("span", { className: "px-2 py-0.5 text-xs rounded bg-[var(--bg-secondary)] border border-[var(--border-color)] text-[var(--text-primary)]", children: a("presets.scopePlatform") }),
                  /* @__PURE__ */ r("span", { className: "text-xs text-[var(--text-muted)] ml-auto", children: [
                    "(",
                    a("presets.fieldParentTheme"),
                    ")"
                  ] })
                ] })
              ] }),
              i === "accent" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
                /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("presets.tabs.accent") }),
                /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: F.map((t, s) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1", children: [
                  /* @__PURE__ */ e("span", { className: `w-8 h-8 rounded-full cursor-pointer border-2 ${s === 0 ? "border-[var(--text-primary)]" : "border-transparent"}`, style: { backgroundColor: t.hex } }),
                  /* @__PURE__ */ e("span", { className: "text-[9px] text-[var(--text-muted)] font-mono", children: t.key })
                ] }, t.key)) })
              ] }),
              i === "backgrounds" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
                /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-primary)]", children: a("presets.tabs.backgrounds") }),
                /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2", children: ["app", "primary", "secondary", "card"].map((t) => /* @__PURE__ */ r("div", { className: "flex items-center gap-2 p-2 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)]", children: [
                  /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded flex-shrink-0 border border-[var(--border-color)]", style: { backgroundColor: T[t] } }),
                  /* @__PURE__ */ r("div", { className: "min-w-0", children: [
                    /* @__PURE__ */ e("div", { className: "text-[10px] text-[var(--text-muted)]", children: t }),
                    /* @__PURE__ */ e("code", { className: "text-[9px] font-mono text-[var(--text-secondary)]", children: T[t] })
                  ] })
                ] }, t)) }),
                /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-muted)] italic", children: a("presets.tabHints.backgrounds") })
              ] }),
              i === "dashboard" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
                /* @__PURE__ */ r("label", { className: "flex items-center gap-2 cursor-pointer", children: [
                  /* @__PURE__ */ e("span", { className: "w-4 h-4 rounded-sm bg-[var(--color-accent-500)] flex items-center justify-center", children: /* @__PURE__ */ e(n, { className: "w-3 h-3 text-white" }) }),
                  /* @__PURE__ */ e("span", { className: "text-sm text-[var(--text-primary)]", children: a("presets.overrideDashboard") })
                ] }),
                /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: x.map((t, s) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1", children: [
                  /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-[var(--radius-card)] border border-[var(--border-color)]", style: { backgroundColor: t } }),
                  /* @__PURE__ */ r("span", { className: "text-[9px] text-[var(--text-muted)] font-mono", children: [
                    "cat-",
                    s + 1
                  ] })
                ] }, s)) })
              ] }),
              i === "typography" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
                /* @__PURE__ */ r("label", { className: "flex items-center gap-2 cursor-pointer", children: [
                  /* @__PURE__ */ e("span", { className: "w-4 h-4 rounded-sm bg-[var(--color-accent-500)] flex items-center justify-center", children: /* @__PURE__ */ e(n, { className: "w-3 h-3 text-white" }) }),
                  /* @__PURE__ */ e("span", { className: "text-sm text-[var(--text-primary)]", children: a("presets.overrideTypography") })
                ] }),
                /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2", children: [
                  { label: "Police", value: "Inter" },
                  { label: "Taille base", value: "16 px" },
                  { label: "Échelle", value: "1.25×" },
                  { label: "Titres", value: "700" }
                ].map((t) => /* @__PURE__ */ r("div", { className: "space-y-1", children: [
                  /* @__PURE__ */ e("div", { className: "text-[10px] text-[var(--text-muted)]", children: t.label }),
                  /* @__PURE__ */ e("div", { className: "px-2.5 py-1.5 rounded-[var(--radius-input)] bg-[var(--bg-primary)] border border-[var(--border-color)] text-xs text-[var(--text-primary)]", children: t.value })
                ] }, t.label)) })
              ] }),
              i === "spacing" && /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] bg-[var(--bg-secondary)] border border-[var(--border-color)] p-4 space-y-3", children: [
                /* @__PURE__ */ r("label", { className: "flex items-center gap-2 cursor-pointer", children: [
                  /* @__PURE__ */ e("span", { className: "w-4 h-4 rounded-sm border border-[var(--border-color)] bg-[var(--bg-primary)]" }),
                  /* @__PURE__ */ e("span", { className: "text-sm text-[var(--text-primary)]", children: a("presets.overrideSpacing") })
                ] }),
                /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a("presets.tabHints.spacing") })
              ] }),
              /* @__PURE__ */ e(d, { children: a(`presets.tabHints.${i}`) })
            ] }),
            /* @__PURE__ */ r("div", { className: "min-w-0", children: [
              /* @__PURE__ */ r("div", { className: "text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1.5 flex items-center gap-1", children: [
                /* @__PURE__ */ e(h, { className: "w-3 h-3" }),
                a("presets.livePreview")
              ] }),
              /* @__PURE__ */ r("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] overflow-hidden", style: { backgroundColor: "#161618" }, children: [
                /* @__PURE__ */ r("div", { className: "flex items-center gap-2 px-3 py-2", style: { backgroundColor: "#1c1c1f", borderBottom: "1px solid #3f3f46" }, children: [
                  /* @__PURE__ */ e("span", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0", style: { backgroundColor: "#6366f1" } }),
                  /* @__PURE__ */ e("span", { className: "text-xs font-semibold flex-1 min-w-0 truncate", style: { color: "#fafafa" }, children: "SmartStack" })
                ] }),
                /* @__PURE__ */ r("div", { className: "p-3 space-y-2", children: [
                  /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
                    /* @__PURE__ */ e("div", { className: "h-6 rounded px-2 flex items-center text-[10px] font-medium", style: { backgroundColor: "#6366f126", color: "#818cf8" }, children: "Dashboard" }),
                    /* @__PURE__ */ e("div", { className: "h-6 rounded px-2 flex items-center text-[10px]", style: { color: "#a1a1aa" }, children: "Users" })
                  ] }),
                  i === "dashboard" ? /* @__PURE__ */ e("div", { className: "flex items-end gap-1 h-14 pt-2", children: [40, 70, 55, 90, 65, 80].map((t, s) => /* @__PURE__ */ e("div", { className: "flex-1 rounded-t", style: { height: `${t}%`, backgroundColor: x[s % x.length] } }, s)) }) : i === "typography" ? /* @__PURE__ */ r("div", { className: "space-y-1.5 p-2 rounded border", style: { borderColor: "#3f3f46", backgroundColor: "#1c1c1f" }, children: [
                    /* @__PURE__ */ e("div", { className: "font-semibold text-sm", style: { color: "#fafafa" }, children: "Inter — 16 px" }),
                    /* @__PURE__ */ e("div", { className: "text-xs", style: { color: "#a1a1aa" }, children: "Scale 1.25× · Bold 700" })
                  ] }) : /* @__PURE__ */ r("div", { className: "rounded p-2.5 space-y-2", style: { backgroundColor: "#1c1c1f", border: "1px solid #3f3f46" }, children: [
                    /* @__PURE__ */ e("div", { className: "h-2 rounded w-3/4", style: { backgroundColor: "#3f3f46" } }),
                    /* @__PURE__ */ e("div", { className: "h-2 rounded w-1/2", style: { backgroundColor: "#2a2a2e" } }),
                    /* @__PURE__ */ r("div", { className: "flex gap-1.5 pt-1", children: [
                      /* @__PURE__ */ e("span", { className: "px-2 py-1 rounded-md text-white", style: { backgroundColor: "#6366f1", fontSize: 10 }, children: "Enregistrer" }),
                      /* @__PURE__ */ e("span", { className: "px-2 py-1 rounded-md", style: { backgroundColor: "#2a2a2e", color: "#d4d4d8", fontSize: 10 }, children: "Annuler" })
                    ] })
                  ] })
                ] })
              ] })
            ] })
          ] })
        ) })
      ] }),
      /* @__PURE__ */ r("div", { className: "space-y-2 mt-3", children: [
        /* @__PURE__ */ e(d, { children: a("presets.annotations.twoColumns") }),
        /* @__PURE__ */ e(d, { children: a("presets.annotations.livePreview") }),
        /* @__PURE__ */ e(d, { children: a("presets.annotations.overrides") }),
        /* @__PURE__ */ e(d, { children: a("presets.annotations.parentTheme") }),
        /* @__PURE__ */ e(d, { children: a("presets.annotations.scope") })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 7, children: a("sections.useCases") }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: ["uc1", "uc2", "uc3", "uc4", "uc5", "uc6"].map((t) => /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-primary)] mb-1", children: a(`useCases.${t}.title`) }),
        /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a(`useCases.${t}.description`) })
      ] }, t)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ e(o, { n: 8, children: a("sections.features") }),
      /* @__PURE__ */ e("ul", { className: "space-y-2", children: ["f1", "f2", "f3", "f4", "f5", "f6"].map((t) => /* @__PURE__ */ r("li", { className: "flex items-start gap-2 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ e(n, { className: "w-4 h-4 mt-0.5 flex-shrink-0 text-[var(--color-accent-500)]" }),
        a(`features.${t}`)
      ] }, t)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "9" }),
        /* @__PURE__ */ e(q, { className: "w-4 h-4" }),
        a("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-3", children: ["q1", "q2", "q3", "q4", "q5"].map((t) => /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-primary)] mb-1", children: a(`faq.${t}`) }),
        /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a(`faq.${t.replace("q", "a")}`) })
      ] }, t)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r(
        "button",
        {
          type: "button",
          onClick: () => $((t) => !t),
          className: "w-full flex items-center justify-between p-4 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-[var(--radius-card)] text-left",
          children: [
            /* @__PURE__ */ r("span", { className: "flex items-center gap-2 text-sm font-medium text-[var(--text-primary)]", children: [
              /* @__PURE__ */ e(G, { className: "w-4 h-4 text-[var(--color-accent-500)]" }),
              a("sections.techRef")
            ] }),
            /* @__PURE__ */ e(O, { className: `w-4 h-4 text-[var(--text-muted)] transition-transform ${g ? "rotate-180" : ""}` })
          ]
        }
      ),
      g && /* @__PURE__ */ r("div", { className: "mt-3 space-y-4", children: [
        Q.map((t) => /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ e("div", { className: "text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wide mb-3", children: a(t.titleKey) }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: t.endpoints.map((s) => /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-xs", children: [
            /* @__PURE__ */ e("span", { className: `px-2 py-0.5 rounded border font-mono font-bold ${Y[s.method]}`, children: s.method }),
            /* @__PURE__ */ e("span", { className: "font-mono text-[var(--text-secondary)] min-w-0 truncate", children: s.path })
          ] }, s.path + s.method)) })
        ] }, t.titleKey)),
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ e("div", { className: "text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wide mb-3", children: a("techRef.rules") }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: X.map((t, s) => /* @__PURE__ */ r("div", { className: "flex items-start gap-2 text-xs", children: [
            /* @__PURE__ */ r("span", { className: "flex-shrink-0 font-mono text-[var(--color-accent-600)] font-bold", children: [
              "BR-",
              String(s + 1).padStart(3, "0")
            ] }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)] leading-relaxed", children: a(`techRef.${t}`) })
          ] }, t)) })
        ] })
      ] })
    ] })
  ] });
}
export {
  se as default
};
//# sourceMappingURL=index-CTXm4Xex.js.map
