import { jsxs as t, jsx as e } from "react/jsx-runtime";
import { useState as n } from "react";
import { Link as B } from "react-router-dom";
import { useTranslation as I } from "react-i18next";
import { Settings as O, Key as g, Database as f, Users as D, Terminal as H, Download as $, FileText as M, History as N, RefreshCw as m, Lock as _, Activity as y, Shield as w, Zap as x, ArrowLeft as F, ChevronRight as k, Plug as i, Plus as V, Search as W, LayoutGrid as z, LayoutList as K, Puzzle as J, Globe as Y, Building2 as Z, Power as Q, Trash2 as X, AlertTriangle as ee, Copy as te, ToggleRight as re, ToggleLeft as ae, Clock as T, HelpCircle as se, ChevronDown as A, Info as ce } from "lucide-react";
function p({ children: r }) {
  return /* @__PURE__ */ t("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(ce, { className: "w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-[var(--text-tertiary)]" }),
    /* @__PURE__ */ e("span", { className: "leading-relaxed", children: r })
  ] });
}
const h = [
  { id: "1", name: "ERP Connector", description: "Synchronisation des données RH vers SAP", clientId: "app-erp-c01", isActive: !0, lastAuthAt: "2026-05-20", authCount: 1842, createdAt: "2026-01-15" },
  { id: "2", name: "BI Dashboard", description: "Export vers Power BI quotidien à 06h00", clientId: "app-bi-c02", isActive: !0, lastAuthAt: "2026-05-21", authCount: 312, createdAt: "2026-02-03" },
  { id: "3", name: "Compliance Reporter", description: "Rapport mensuel audit SOC2", clientId: "app-cmp-c03", isActive: !1, lastAuthAt: "2026-03-31", authCount: 47, createdAt: "2025-11-10" },
  { id: "4", name: "Mobile App Gateway", description: "API gateway application mobile iOS/Android", clientId: "app-mob-c04", isActive: !0, lastAuthAt: "2026-05-21", authCount: 9204, createdAt: "2026-03-22" }
], C = [
  { method: "GET", path: "/api/accounts", handler: "GetAll", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/{id}", handler: "GetById", permission: "api.accounts.read" },
  { method: "POST", path: "/api/accounts", handler: "Create", permission: "api.accounts.create" },
  { method: "PUT", path: "/api/accounts/{id}", handler: "Update", permission: "api.accounts.update" },
  { method: "PUT", path: "/api/accounts/{id}/assign-tenant", handler: "AssignToTenant", permission: "api.accounts.assign" },
  { method: "DELETE", path: "/api/accounts/{id}", handler: "Delete", permission: "api.accounts.delete" },
  { method: "PATCH", path: "/api/accounts/{id}/activate", handler: "Activate", permission: "api.accounts.update" },
  { method: "PATCH", path: "/api/accounts/{id}/deactivate", handler: "Deactivate", permission: "api.accounts.update" },
  { method: "POST", path: "/api/accounts/{id}/rotate-secret", handler: "RotateSecret", permission: "api.accounts.execute" },
  { method: "DELETE", path: "/api/accounts/{id}/secondary-secret", handler: "RevokeSecondarySecret", permission: "api.accounts.execute" },
  { method: "GET", path: "/api/accounts/{id}/audit-logs", handler: "GetAuditLogs", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/{id}/usage-stats", handler: "GetUsageStats", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/{id}/key-usage", handler: "GetKeyUsage", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/api-endpoints", handler: "GetApiEndpoints", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/{id}/api-access", handler: "GetAppApiAccess", permission: "api.accounts.read" },
  { method: "PUT", path: "/api/accounts/{id}/api-access/{endpointId}", handler: "UpdateApiAccess", permission: "api.accounts.update" },
  { method: "DELETE", path: "/api/accounts/{id}/api-access/{endpointId}", handler: "RemoveApiAccess", permission: "api.accounts.update" },
  { method: "GET", path: "/api/accounts/{id}/user-access", handler: "GetUserAccess", permission: "api.accounts.read" },
  { method: "PUT", path: "/api/accounts/{id}/user-access/{userId}", handler: "SetUserAccess", permission: "api.accounts.assign" },
  { method: "DELETE", path: "/api/accounts/{id}/user-access/{userId}", handler: "RevokeUserAccess", permission: "api.accounts.assign" },
  { method: "GET", path: "/api/accounts/{id}/change-logs", handler: "GetChangeLogs", permission: "api.accounts.read" },
  { method: "GET", path: "/api/accounts/_my-access", handler: "GetMyAccess", permission: "(authentifié)" },
  { method: "POST", path: "/api/accounts/generate-secret", handler: "GenerateSecret", permission: "api.accounts.create" }
], E = [
  { id: "BR-001", category: "Validation", statement: "Le nom de l'application est obligatoire et ne peut pas être vide ou composé uniquement d'espaces." },
  { id: "BR-002", category: "Sécurité", statement: "Le secret client doit faire au moins 32 caractères. En dessous, la robustesse cryptographique de la signature HMAC-SHA256 est insuffisante." },
  { id: "BR-003", category: "Validation", statement: "La durée de validité du token doit être comprise entre 1 et 1440 minutes (24 heures)." },
  { id: "BR-004", category: "Sécurité", statement: "Toute rotation de secret (primaire ou secondaire) ou désactivation de l'application invalide immédiatement tous les JWT en circulation via le SecurityStamp." },
  { id: "BR-005", category: "Gestion des clés", statement: "Une application ne peut avoir qu'un seul secret secondaire à la fois. Il est impossible d'en ajouter un deuxième si le champ secondaire est déjà renseigné." },
  { id: "BR-006", category: "Gestion des clés", statement: "La révocation du secret secondaire est impossible s'il n'existe pas encore." },
  { id: "BR-007", category: "Sécurité", statement: "La liste blanche d'IP est optionnelle. Si elle est vide, toutes les adresses sont autorisées. Si renseignée, seules les IPs listées (séparées par des virgules) peuvent s'authentifier." },
  { id: "BR-008", category: "Accès", statement: "Les applications externes n'ont accès qu'aux routes /api/v1/export/*, /api/auth/external-app/* et /api/v1/me/access. Toute autre route retourne 403 route_blocked." },
  { id: "BR-009", category: "Portée tenant", statement: "L'attachement d'une application à un tenant est une opération one-way : une application globale peut être rattachée à un tenant, mais une application déjà rattachée ne peut pas être réassignée à un autre tenant." },
  { id: "BR-010", category: "Délégation", statement: "La délégation d'instance (onglet Accès) permet à des utilisateurs SmartStack de gérer une application sans permission globale. L'octroi et la révocation nécessitent la permission api.accounts.assign. Le niveau ReadOnly permet la consultation et les stats ; Operate permet aussi la rotation de clés et la gestion des endpoints." }
], ie = {
  GET: "bg-[var(--info-bg)] text-[var(--info-text)] border border-[var(--info-border)]",
  POST: "bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]",
  PUT: "bg-[var(--warning-bg)] text-[var(--warning-text)] border border-[var(--warning-border)]",
  PATCH: "bg-[var(--warning-bg)] text-[var(--warning-text)] border border-[var(--warning-border)]",
  DELETE: "bg-[var(--error-bg)] text-[var(--error-text)] border border-[var(--error-border)]"
};
function xe() {
  const { t: r } = I("docsApiAccounts"), [d, v] = n("table"), [c, R] = n("info"), [l, S] = n(null), [o, P] = n(!1), [q, b] = n(!1), j = [
    { id: "info", label: r("detail.tabs.info"), icon: O },
    { id: "keys", label: r("detail.tabs.keys"), icon: g },
    { id: "exports", label: r("detail.tabs.exports"), icon: f },
    { id: "access", label: r("detail.tabs.access"), icon: D },
    { id: "prompt", label: r("detail.tabs.prompt"), icon: H },
    { id: "postman", label: r("detail.tabs.postman"), icon: $ },
    { id: "audit", label: r("detail.tabs.audit"), icon: M },
    { id: "history", label: r("detail.tabs.history"), icon: N }
  ], G = [
    { q: r("faq.q1"), a: r("faq.a1") },
    { q: r("faq.q2"), a: r("faq.a2") },
    { q: r("faq.q3"), a: r("faq.a3") },
    { q: r("faq.q4"), a: r("faq.a4") },
    { q: r("faq.q5"), a: r("faq.a5") }
  ], L = [
    { icon: m, title: r("features.f1.title"), desc: r("features.f1.desc") },
    { icon: _, title: r("features.f2.title"), desc: r("features.f2.desc") },
    { icon: f, title: r("features.f3.title"), desc: r("features.f3.desc") },
    { icon: y, title: r("features.f4.title"), desc: r("features.f4.desc") },
    { icon: w, title: r("features.f5.title"), desc: r("features.f5.desc") },
    { icon: x, title: r("features.f6.title"), desc: r("features.f6.desc") }
  ];
  return /* @__PURE__ */ t("div", { className: "space-y-8 max-w-5xl mx-auto pb-12", children: [
    /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-sm text-[var(--text-secondary)]", children: [
      /* @__PURE__ */ t(B, { to: "/system/docs/user", className: "hover:text-[var(--color-accent-600)] transition-colors flex items-center gap-1", children: [
        /* @__PURE__ */ e(F, { className: "w-3.5 h-3.5" }),
        r("nav.backToUser")
      ] }),
      /* @__PURE__ */ e(k, { className: "w-3.5 h-3.5" }),
      /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)]", children: r("nav.api") }),
      /* @__PURE__ */ e(k, { className: "w-3.5 h-3.5" }),
      /* @__PURE__ */ e("span", { className: "font-medium text-[var(--text-primary)]", children: r("title") })
    ] }),
    /* @__PURE__ */ t("div", { className: "flex items-start gap-4", children: [
      /* @__PURE__ */ e("div", { className: "p-3 rounded-[var(--radius-card)] bg-[var(--accent-bg)]", children: /* @__PURE__ */ e(i, { className: "w-8 h-8 text-[var(--color-accent-600)]" }) }),
      /* @__PURE__ */ t("div", { children: [
        /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-[var(--text-primary)]", children: r("title") }),
        /* @__PURE__ */ e("p", { className: "mt-1 text-[var(--text-secondary)]", children: r("subtitle") }),
        /* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap gap-2", children: [
          /* @__PURE__ */ e("span", { className: "px-2.5 py-0.5 rounded-full text-xs font-medium bg-[var(--accent-bg)] text-[var(--accent-text)]", children: r("badge.license") }),
          /* @__PURE__ */ e("span", { className: "px-2.5 py-0.5 rounded-full text-xs font-medium bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)]", children: r("badge.permission") })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "1" }),
        r("sections.objective")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] p-6 overflow-hidden", children: /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] leading-relaxed", children: r("objective.description") }) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "2" }),
        r("sections.access")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] p-6 overflow-hidden", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-6", children: [
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("p", { className: "text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-1", children: r("access.navigation") }),
          /* @__PURE__ */ e("p", { className: "text-sm font-medium text-[var(--text-primary)]", children: r("access.path") })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("p", { className: "text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-1", children: r("access.url") }),
          /* @__PURE__ */ e("code", { className: "text-xs bg-[var(--bg-secondary)] border border-[var(--border-color)] px-2 py-1 rounded text-[var(--text-primary)]", children: "/api/accounts" })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("p", { className: "text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-1", children: r("access.permission") }),
          /* @__PURE__ */ e("code", { className: "text-xs bg-[var(--bg-secondary)] border border-[var(--border-color)] px-2 py-1 rounded text-[var(--text-primary)]", children: "api.accounts.read" })
        ] })
      ] }) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "3" }),
        r("sections.overview")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: /* @__PURE__ */ t("div", { className: "p-4 space-y-4", children: [
        /* @__PURE__ */ t("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] bg-[var(--bg-primary)] overflow-hidden", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-4 py-3 border-b border-[var(--border-color)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e(i, { className: "w-5 h-5 text-[var(--color-accent-600)]" }),
              /* @__PURE__ */ e("span", { className: "font-semibold text-[var(--text-primary)] text-sm", children: r("overview.pageTitle") })
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-[var(--color-accent-600)] text-white text-xs font-medium", children: [
              /* @__PURE__ */ e(V, { className: "w-3.5 h-3.5" }),
              r("overview.createButton")
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "px-4 py-3 border-b border-[var(--border-color)] space-y-2", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
              /* @__PURE__ */ t("div", { className: "flex-1 flex items-center gap-2 px-3 py-1.5 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-tertiary)]", children: [
                /* @__PURE__ */ e(W, { className: "w-3.5 h-3.5" }),
                /* @__PURE__ */ e("span", { className: "text-xs", children: r("overview.searchPlaceholder") })
              ] }),
              /* @__PURE__ */ e("select", { className: "px-3 py-1.5 text-xs rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)]", children: /* @__PURE__ */ e("option", { children: r("overview.allStatus") }) })
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
              /* @__PURE__ */ e(
                "button",
                {
                  onClick: () => v("cards"),
                  className: `p-1.5 rounded-lg transition-colors ${d === "cards" ? "bg-[var(--color-accent-600)] text-white" : "bg-[var(--bg-secondary)] text-[var(--text-tertiary)]"}`,
                  children: /* @__PURE__ */ e(z, { className: "w-4 h-4" })
                }
              ),
              /* @__PURE__ */ e(
                "button",
                {
                  onClick: () => v("table"),
                  className: `p-1.5 rounded-lg transition-colors ${d === "table" ? "bg-[var(--color-accent-600)] text-white" : "bg-[var(--bg-secondary)] text-[var(--text-tertiary)]"}`,
                  children: /* @__PURE__ */ e(K, { className: "w-4 h-4" })
                }
              ),
              /* @__PURE__ */ t("span", { className: "ml-auto text-xs text-[var(--text-tertiary)]", children: [
                h.length,
                " ",
                r("overview.count")
              ] })
            ] })
          ] }),
          d === "table" ? /* @__PURE__ */ t("table", { className: "w-full text-xs", children: [
            /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { className: "bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("th", { className: "text-left px-4 py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("overview.colName") }),
              /* @__PURE__ */ e("th", { className: "text-left px-4 py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("overview.colStatus") }),
              /* @__PURE__ */ e("th", { className: "text-left px-4 py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: r("overview.colLastAuth") }),
              /* @__PURE__ */ e("th", { className: "text-right px-4 py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: r("overview.colAuthCount") }),
              /* @__PURE__ */ e("th", { className: "text-left px-4 py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: r("overview.colCreated") })
            ] }) }),
            /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: h.map((a) => /* @__PURE__ */ t("tr", { className: "hover:bg-[var(--bg-hover)] transition-colors cursor-pointer", children: [
              /* @__PURE__ */ e("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e(i, { className: "w-4 h-4 text-[var(--color-accent-600)] flex-shrink-0" }),
                /* @__PURE__ */ t("div", { children: [
                  /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: a.name }),
                  /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)] line-clamp-1", children: a.description })
                ] })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ t("div", { className: "inline-flex items-center gap-1.5", children: [
                /* @__PURE__ */ e("div", { className: `w-2 h-2 rounded-full ${a.isActive ? "bg-[var(--success-bg)]" : "bg-[var(--warning-bg)]"}` }),
                /* @__PURE__ */ e("span", { className: a.isActive ? "text-[var(--success-text)]" : "text-[var(--warning-text)]", children: a.isActive ? r("overview.active") : r("overview.inactive") })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-2.5 text-[var(--text-secondary)] hidden lg:table-cell", children: a.lastAuthAt ?? r("overview.never") }),
              /* @__PURE__ */ e("td", { className: "px-4 py-2.5 text-right text-[var(--text-secondary)] hidden lg:table-cell", children: a.authCount.toLocaleString() }),
              /* @__PURE__ */ e("td", { className: "px-4 py-2.5 text-[var(--text-secondary)] hidden lg:table-cell", children: a.createdAt })
            ] }, a.id)) })
          ] }) : /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3 p-4", children: h.map((a) => /* @__PURE__ */ t("div", { className: "rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)] p-3 cursor-pointer hover:shadow-sm transition-shadow", children: [
            /* @__PURE__ */ t("div", { className: "flex items-start justify-between mb-2", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e("div", { className: "p-1.5 rounded-lg bg-[var(--bg-secondary)]", children: /* @__PURE__ */ e(i, { className: "w-3.5 h-3.5 text-[var(--color-accent-600)]" }) }),
                /* @__PURE__ */ e("p", { className: "text-xs font-semibold text-[var(--text-primary)]", children: a.name })
              ] }),
              /* @__PURE__ */ e("div", { className: "inline-flex items-center gap-1", children: /* @__PURE__ */ e("div", { className: `w-1.5 h-1.5 rounded-full ${a.isActive ? "bg-[var(--success-bg)]" : "bg-[var(--warning-bg)]"}` }) })
            ] }),
            /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)] line-clamp-1", children: a.description })
          ] }, a.id)) })
        ] }),
        /* @__PURE__ */ e(p, { children: r("overview.annotation") })
      ] }) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "4" }),
        r("sections.createForm")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: /* @__PURE__ */ t("div", { className: "p-4 space-y-4", children: [
        /* @__PURE__ */ t("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] bg-[var(--bg-primary)] p-4 space-y-4", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 pb-2 border-b border-[var(--border-color)]", children: [
            /* @__PURE__ */ e(i, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: r("create.formTitle") })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("label", { className: "block text-xs font-semibold text-[var(--text-secondary)] mb-1", children: [
              r("create.fieldName"),
              " ",
              /* @__PURE__ */ e("span", { className: "text-[var(--error-text)]", children: "*" })
            ] }),
            /* @__PURE__ */ e("div", { className: "rounded-lg border border-[var(--color-accent-500)] bg-[var(--bg-secondary)] px-3 py-2 text-xs text-[var(--text-primary)]", children: "ERP Connector" })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("label", { className: "block text-xs font-semibold text-[var(--text-secondary)] mb-1", children: r("create.fieldDescription") }),
            /* @__PURE__ */ e("div", { className: "rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] px-3 py-2 text-xs text-[var(--text-tertiary)] min-h-[48px]", children: r("create.descPlaceholder") })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("label", { className: "block text-xs font-semibold text-[var(--text-secondary)] mb-1", children: r("create.fieldIpWhitelist") }),
            /* @__PURE__ */ e("div", { className: "rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] px-3 py-2 text-xs text-[var(--text-tertiary)]", children: r("create.ipPlaceholder") }),
            /* @__PURE__ */ e("p", { className: "mt-1 text-[10px] text-[var(--text-tertiary)]", children: r("create.ipHelp") })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("label", { className: "block text-xs font-semibold text-[var(--text-secondary)] mb-1", children: r("create.fieldTokenExpiry") }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e("div", { className: "w-24 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] px-3 py-2 text-xs text-[var(--text-primary)]", children: "60" }),
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-secondary)]", children: r("create.tokenExpiryUnit") }),
              /* @__PURE__ */ e("span", { className: "text-[10px] text-[var(--text-tertiary)]", children: r("create.tokenExpiryRange") })
            ] })
          ] }),
          /* @__PURE__ */ e("button", { className: "w-full py-2 rounded-lg bg-[var(--color-accent-600)] text-white text-xs font-medium hover:bg-[var(--color-accent-700)]", children: r("create.submitButton") })
        ] }),
        /* @__PURE__ */ e(p, { children: r("create.annotation") })
      ] }) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "5" }),
        r("sections.detailView")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: /* @__PURE__ */ t("div", { className: "p-4 space-y-4", children: [
        /* @__PURE__ */ t("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] bg-[var(--bg-primary)] overflow-hidden", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-4 py-3 border-b border-[var(--border-color)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
              /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-[var(--bg-secondary)]", children: /* @__PURE__ */ e(J, { className: "w-5 h-5 text-[var(--color-accent-600)]" }) }),
              /* @__PURE__ */ t("div", { children: [
                /* @__PURE__ */ e("p", { className: "font-semibold text-[var(--text-primary)] text-sm", children: "ERP Connector" }),
                /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)]", children: "Synchronisation des données RH vers SAP" })
              ] })
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e("span", { className: "px-2.5 py-1 rounded-lg text-xs font-medium bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]", children: r("detail.active") }),
              /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-[var(--info-bg)] text-[var(--info-text)] border border-[var(--info-border)]", children: [
                /* @__PURE__ */ e(Y, { className: "w-3 h-3" }),
                r("detail.scope.global")
              ] }),
              /* @__PURE__ */ t(
                "button",
                {
                  onClick: () => b(!0),
                  className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)] hover:bg-[var(--bg-hover)]",
                  children: [
                    /* @__PURE__ */ e(Z, { className: "w-3 h-3" }),
                    r("detail.assignTenant.button")
                  ]
                }
              ),
              /* @__PURE__ */ t("button", { className: "flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--error-bg)] text-[var(--error-text)] border border-[var(--error-border)]", children: [
                /* @__PURE__ */ e(Q, { className: "w-3.5 h-3.5" }),
                r("detail.deactivate")
              ] }),
              /* @__PURE__ */ e("button", { className: "p-1.5 rounded-lg text-[var(--error-text)] bg-[var(--error-bg)] border border-[var(--error-border)]", children: /* @__PURE__ */ e(X, { className: "w-3.5 h-3.5" }) })
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "mx-4 mt-3 p-3 flex items-start gap-2 rounded-lg bg-[var(--error-bg)] border border-[var(--error-border)] text-[var(--error-text)]", children: [
            /* @__PURE__ */ e(ee, { className: "w-3.5 h-3.5 mt-0.5 flex-shrink-0" }),
            /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
              /* @__PURE__ */ e("p", { className: "text-xs font-semibold", children: r("detail.security.bannerTitle") }),
              /* @__PURE__ */ e("p", { className: "text-[10px] mt-0.5", children: r("detail.security.bannerBody") }),
              /* @__PURE__ */ t("p", { className: "text-[10px] mt-1", children: [
                /* @__PURE__ */ e("span", { className: "font-semibold", children: r("detail.security.removedPermissions") }),
                " ",
                /* @__PURE__ */ e("code", { className: "font-mono", children: "administration.users.read, administration.roles.read" })
              ] })
            ] })
          ] }),
          /* @__PURE__ */ e("div", { className: "flex border-b border-[var(--border-color)] overflow-x-auto mt-3", children: j.map((a) => /* @__PURE__ */ t(
            "button",
            {
              onClick: () => R(a.id),
              className: `flex items-center gap-1.5 px-3 py-2.5 text-xs font-medium border-b-2 transition-colors whitespace-nowrap ${c === a.id ? "border-[var(--color-accent-600)] text-[var(--color-accent-600)]" : "border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,
              children: [
                /* @__PURE__ */ e(a.icon, { className: "w-3.5 h-3.5" }),
                a.label
              ]
            },
            a.id
          )) }),
          /* @__PURE__ */ t("div", { className: "p-4", children: [
            c === "info" && /* @__PURE__ */ e("div", { className: "space-y-3 text-xs", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3", children: [
              /* @__PURE__ */ t("div", { children: [
                /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold text-[var(--text-tertiary)] uppercase tracking-wide mb-1", children: r("detail.infoTab.name") }),
                /* @__PURE__ */ e("p", { className: "text-[var(--text-primary)]", children: "ERP Connector" })
              ] }),
              /* @__PURE__ */ t("div", { children: [
                /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold text-[var(--text-tertiary)] uppercase tracking-wide mb-1", children: r("detail.infoTab.tokenExpiry") }),
                /* @__PURE__ */ t("p", { className: "text-[var(--text-primary)]", children: [
                  "60 ",
                  r("create.tokenExpiryUnit")
                ] })
              ] }),
              /* @__PURE__ */ t("div", { className: "col-span-2", children: [
                /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold text-[var(--text-tertiary)] uppercase tracking-wide mb-1", children: r("detail.infoTab.description") }),
                /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: "Synchronisation des données RH vers SAP" })
              ] }),
              /* @__PURE__ */ t("div", { className: "col-span-2", children: [
                /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold text-[var(--text-tertiary)] uppercase tracking-wide mb-1", children: r("detail.infoTab.ipWhitelist") }),
                /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("detail.infoTab.ipNone") })
              ] })
            ] }) }),
            c === "keys" && /* @__PURE__ */ t("div", { className: "space-y-3 text-xs", children: [
              /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)]", children: [
                /* @__PURE__ */ e("p", { className: "text-[10px] font-semibold text-[var(--text-tertiary)] uppercase tracking-wide mb-1", children: r("detail.keysTab.clientId") }),
                /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ e("code", { className: "flex-1 font-mono text-[var(--text-primary)] truncate", children: "app-erp-c01-47f3..." }),
                  /* @__PURE__ */ e("button", { className: "p-1 rounded hover:bg-[var(--bg-hover)]", children: /* @__PURE__ */ e(te, { className: "w-3.5 h-3.5 text-[var(--text-tertiary)]" }) })
                ] })
              ] }),
              /* @__PURE__ */ e("div", { className: "space-y-2", children: ["Primary", "Secondary"].map((a, s) => /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-3 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)]", children: [
                /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ e(g, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
                  /* @__PURE__ */ t("div", { children: [
                    /* @__PURE__ */ t("p", { className: "font-medium text-[var(--text-primary)]", children: [
                      r("detail.keysTab.secret"),
                      " ",
                      s + 1
                    ] }),
                    /* @__PURE__ */ e("code", { className: "text-[10px] text-[var(--text-tertiary)]", children: "Ab3xY7••••••••" })
                  ] })
                ] }),
                /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
                  /* @__PURE__ */ t("span", { className: "text-[10px] text-[var(--text-tertiary)]", children: [
                    s === 0 ? "1842" : "304",
                    " ",
                    r("detail.keysTab.uses")
                  ] }),
                  /* @__PURE__ */ e("button", { className: "p-1 rounded hover:bg-[var(--bg-hover)]", children: /* @__PURE__ */ e(m, { className: "w-3 h-3 text-[var(--text-tertiary)]" }) })
                ] })
              ] }, a)) })
            ] }),
            c === "exports" && /* @__PURE__ */ t("div", { className: "space-y-2 text-xs", children: [
              /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("detail.exportsTab.desc") }),
              [
                { name: "Export Users", route: "/api/v1/export/users", type: "Read", enabled: !0, requests: 312 },
                { name: "Export Tenants", route: "/api/v1/export/tenants", type: "Read", enabled: !0, requests: 47 },
                { name: "Export Roles", route: "/api/v1/export/roles", type: "Read", enabled: !1, requests: 0 }
              ].map((a) => /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-2.5 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)] cursor-pointer hover:bg-[var(--bg-hover)]", children: [
                /* @__PURE__ */ t("div", { children: [
                  /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: a.name }),
                  /* @__PURE__ */ e("code", { className: "text-[10px] text-[var(--text-tertiary)]", children: a.route })
                ] }),
                /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ e("span", { className: "px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase bg-[var(--info-bg)] text-[var(--info-text)]", children: a.type }),
                  /* @__PURE__ */ e("span", { className: `text-[10px] font-medium ${a.enabled ? "text-[var(--success-text)]" : "text-[var(--text-tertiary)]"}`, children: a.enabled ? /* @__PURE__ */ e(re, { className: "w-5 h-3 text-[var(--success-text)]" }) : /* @__PURE__ */ e(ae, { className: "w-5 h-3" }) }),
                  /* @__PURE__ */ t("span", { className: "text-[10px] text-[var(--text-tertiary)] flex items-center gap-0.5", children: [
                    /* @__PURE__ */ e(y, { className: "w-3 h-3" }),
                    a.requests
                  ] })
                ] })
              ] }, a.name))
            ] }),
            c === "audit" && /* @__PURE__ */ e("div", { className: "space-y-2 text-xs", children: [
              { ts: "2026-05-21 08:42", ip: "10.1.2.50", action: "authenticate", ok: !0 },
              { ts: "2026-05-21 08:41", ip: "10.1.2.50", action: "export/users", ok: !0 },
              { ts: "2026-05-20 23:10", ip: "10.1.2.50", action: "authenticate", ok: !1 }
            ].map((a, s) => /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-2.5 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)]", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e("div", { className: `w-2 h-2 rounded-full flex-shrink-0 ${a.ok ? "bg-[var(--success-bg)]" : "bg-[var(--error-bg)]"}` }),
                /* @__PURE__ */ e("code", { className: "text-[10px] text-[var(--text-secondary)]", children: a.action })
              ] }),
              /* @__PURE__ */ t("div", { className: "flex items-center gap-3 text-[10px] text-[var(--text-tertiary)]", children: [
                /* @__PURE__ */ e("span", { children: a.ip }),
                /* @__PURE__ */ t("span", { className: "flex items-center gap-0.5", children: [
                  /* @__PURE__ */ e(T, { className: "w-2.5 h-2.5" }),
                  a.ts
                ] })
              ] })
            ] }, s)) }),
            c === "access" && /* @__PURE__ */ t("div", { className: "space-y-2 text-xs", children: [
              /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("detail.accessTab.desc") }),
              [
                { name: "Alice Martin", email: "alice@corp.io", level: "Operate", granted: "2026-05-10" },
                { name: "Bob Chen", email: "bob@corp.io", level: "ReadOnly", granted: "2026-05-15" }
              ].map((a, s) => /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-2.5 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)]", children: [
                /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ e("div", { className: "w-7 h-7 rounded-full bg-[var(--color-accent-100)] flex items-center justify-center text-[10px] font-bold text-[var(--color-accent-700)]", children: a.name.charAt(0) }),
                  /* @__PURE__ */ t("div", { children: [
                    /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: a.name }),
                    /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)]", children: a.email })
                  ] })
                ] }),
                /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                  /* @__PURE__ */ e("span", { className: `px-2 py-0.5 rounded-full text-[10px] font-semibold border ${a.level === "Operate" ? "bg-[var(--warning-bg)] text-[var(--warning-text)] border-[var(--warning-border)]" : "bg-[var(--info-bg)] text-[var(--info-text)] border-[var(--info-border)]"}`, children: a.level }),
                  /* @__PURE__ */ e("span", { className: "text-[10px] text-[var(--text-tertiary)]", children: a.granted })
                ] })
              ] }, s))
            ] }),
            c === "history" && /* @__PURE__ */ t("div", { className: "space-y-2 text-xs", children: [
              /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("detail.historyTab.desc") }),
              [
                { ts: "2026-05-21 09:15", user: "admin@corp.io", action: "api_access_updated", detail: "Export Users activé" },
                { ts: "2026-05-20 14:30", user: "admin@corp.io", action: "user_access_granted", detail: "alice@corp.io → Operate" },
                { ts: "2026-05-15 11:00", user: "admin@corp.io", action: "secret_rotated", detail: "Clé primaire renouvelée" }
              ].map((a, s) => /* @__PURE__ */ t("div", { className: "flex items-start justify-between p-2.5 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)]", children: [
                /* @__PURE__ */ t("div", { className: "flex items-start gap-2", children: [
                  /* @__PURE__ */ e(N, { className: "w-3.5 h-3.5 mt-0.5 text-[var(--color-accent-600)] flex-shrink-0" }),
                  /* @__PURE__ */ t("div", { children: [
                    /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: a.action }),
                    /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)]", children: a.detail })
                  ] })
                ] }),
                /* @__PURE__ */ t("div", { className: "text-right text-[10px] text-[var(--text-tertiary)]", children: [
                  /* @__PURE__ */ e("p", { children: a.user }),
                  /* @__PURE__ */ t("p", { className: "flex items-center gap-0.5 justify-end", children: [
                    /* @__PURE__ */ e(T, { className: "w-2.5 h-2.5" }),
                    a.ts
                  ] })
                ] })
              ] }, s))
            ] }),
            !["info", "keys", "exports", "access", "audit", "history"].includes(c) && /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-tertiary)] text-center py-4", children: r("detail.tabSelect") })
          ] })
        ] }),
        q && /* @__PURE__ */ t("div", { className: "rounded-[var(--radius-card)] border border-[var(--border-color)] bg-[var(--bg-card)] shadow-sm overflow-hidden", children: [
          /* @__PURE__ */ t("div", { className: "p-4 border-b border-[var(--border-color)]", children: [
            /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-[var(--text-primary)]", children: r("detail.assignTenant.title") }),
            /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-[var(--text-secondary)]", children: r("detail.assignTenant.description") })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-4 space-y-3", children: [
            /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-secondary)]", children: r("detail.assignTenant.tenantLabel") }),
            /* @__PURE__ */ e("div", { className: "w-full px-3 py-2 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)] text-xs text-[var(--text-tertiary)]", children: r("detail.assignTenant.tenantPlaceholder") }),
            /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--warning-text)]", children: r("detail.assignTenant.warning") })
          ] }),
          /* @__PURE__ */ t("div", { className: "flex justify-end gap-2 p-4 border-t border-[var(--border-color)]", children: [
            /* @__PURE__ */ e(
              "button",
              {
                onClick: () => b(!1),
                className: "px-3 py-1.5 rounded-lg border border-[var(--border-color)] text-xs text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",
                children: r("detail.assignTenant.cancel")
              }
            ),
            /* @__PURE__ */ e("button", { className: "px-3 py-1.5 rounded-lg bg-[var(--color-accent-600)] text-white text-xs font-medium hover:bg-[var(--color-accent-700)]", children: r("detail.assignTenant.confirm") })
          ] })
        ] }),
        /* @__PURE__ */ e(p, { children: r("detail.annotation") })
      ] }) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "6" }),
        r("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
        { icon: i, persona: r("useCases.uc1.persona"), scenario: r("useCases.uc1.scenario"), steps: [r("useCases.uc1.s1"), r("useCases.uc1.s2"), r("useCases.uc1.s3")] },
        { icon: m, persona: r("useCases.uc2.persona"), scenario: r("useCases.uc2.scenario"), steps: [r("useCases.uc2.s1"), r("useCases.uc2.s2"), r("useCases.uc2.s3")] },
        { icon: w, persona: r("useCases.uc3.persona"), scenario: r("useCases.uc3.scenario"), steps: [r("useCases.uc3.s1"), r("useCases.uc3.s2"), r("useCases.uc3.s3")] }
      ].map((a, s) => /* @__PURE__ */ t("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-3", children: [
          /* @__PURE__ */ e("div", { className: "p-1.5 rounded-lg bg-[var(--accent-bg)]", children: /* @__PURE__ */ e(a.icon, { className: "w-4 h-4 text-[var(--color-accent-600)]" }) }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("p", { className: "text-xs font-bold text-[var(--text-primary)]", children: a.persona }),
            /* @__PURE__ */ e("p", { className: "text-[10px] text-[var(--text-tertiary)]", children: a.scenario })
          ] })
        ] }),
        /* @__PURE__ */ e("ol", { className: "space-y-1.5", children: a.steps.map((U, u) => /* @__PURE__ */ t("li", { className: "flex items-start gap-2 text-xs text-[var(--text-secondary)]", children: [
          /* @__PURE__ */ e("span", { className: "flex-shrink-0 w-4 h-4 rounded-full bg-[var(--bg-secondary)] text-[var(--text-tertiary)] flex items-center justify-center text-[10px] font-bold", children: u + 1 }),
          U
        ] }, u)) })
      ] }, s)) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "7" }),
        r("sections.features")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: L.map((a, s) => /* @__PURE__ */ t("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
          /* @__PURE__ */ e(a.icon, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
          /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a.title })
        ] }),
        /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] leading-relaxed", children: a.desc })
      ] }, s)) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "8" }),
        r("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-2", children: G.map((a, s) => /* @__PURE__ */ t("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: [
        /* @__PURE__ */ t(
          "button",
          {
            onClick: () => S(l === s ? null : s),
            className: "w-full flex items-center justify-between px-4 py-3 text-left hover:bg-[var(--bg-hover)] transition-colors",
            children: [
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e(se, { className: "w-4 h-4 text-[var(--color-accent-600)] flex-shrink-0" }),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[var(--text-primary)]", children: a.q })
              ] }),
              /* @__PURE__ */ e(A, { className: `w-4 h-4 text-[var(--text-tertiary)] transition-transform ${l === s ? "rotate-180" : ""}` })
            ]
          }
        ),
        l === s && /* @__PURE__ */ e("div", { className: "px-4 pb-3 pt-0", children: /* @__PURE__ */ e("div", { className: "pl-6 text-sm text-[var(--text-secondary)] leading-relaxed border-l-2 border-[var(--color-accent-500)]", children: a.a }) })
      ] }, s)) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t(
        "button",
        {
          onClick: () => P(!o),
          className: "w-full flex items-center justify-between p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] hover:bg-[var(--bg-hover)] transition-colors",
          children: [
            /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] flex items-center gap-2", children: [
              /* @__PURE__ */ e("span", { className: "flex items-center justify-center w-6 h-6 rounded-full bg-[var(--color-accent-500)] text-white text-xs font-bold flex-shrink-0", children: "9" }),
              r("sections.techRef")
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-sm text-[var(--text-secondary)]", children: [
              /* @__PURE__ */ t("span", { className: "text-xs", children: [
                E.length,
                " ",
                r("header.businessRules"),
                " · ",
                C.length,
                " ",
                r("header.apiEndpoints")
              ] }),
              /* @__PURE__ */ e(A, { className: `w-5 h-5 transition-transform ${o ? "rotate-180" : ""}` })
            ] })
          ]
        }
      ),
      o && /* @__PURE__ */ t("div", { className: "mt-2 space-y-6", children: [
        /* @__PURE__ */ t("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] p-4 overflow-hidden", children: [
          /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(x, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            r("techRef.businessRulesTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: E.map((a) => /* @__PURE__ */ t("div", { className: "flex items-start gap-3 p-2.5 rounded-lg bg-[var(--bg-secondary)]", children: [
            /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-bold bg-[var(--accent-bg)] text-[var(--accent-text)]", children: a.id }) }),
            /* @__PURE__ */ t("div", { children: [
              /* @__PURE__ */ e("span", { className: "text-[10px] text-[var(--text-tertiary)] uppercase tracking-wide font-semibold", children: a.category }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: a.statement })
            ] })
          ] }, a.id)) })
        ] }),
        /* @__PURE__ */ t("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] p-4 overflow-hidden", children: [
          /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(x, { className: "w-4 h-4 text-[var(--color-accent-600)]" }),
            r("techRef.apiEndpointsTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t("table", { className: "w-full text-xs", children: [
            /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { className: "border-b border-[var(--border-color)]", children: [
              /* @__PURE__ */ e("th", { className: "text-left py-2 pr-4 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("techRef.colMethod") }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 pr-4 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("techRef.colPath") }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("techRef.colPermission") })
            ] }) }),
            /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: C.map((a, s) => /* @__PURE__ */ t("tr", { children: [
              /* @__PURE__ */ e("td", { className: "py-2 pr-4", children: /* @__PURE__ */ e("span", { className: `inline-flex px-1.5 py-0.5 rounded text-[10px] font-bold border ${ie[a.method]}`, children: a.method }) }),
              /* @__PURE__ */ e("td", { className: "py-2 pr-4", children: /* @__PURE__ */ e("code", { className: "text-[var(--text-primary)]", children: a.path }) }),
              /* @__PURE__ */ e("td", { className: "py-2", children: /* @__PURE__ */ e("code", { className: "text-[var(--text-tertiary)]", children: a.permission }) })
            ] }, s)) })
          ] }) })
        ] })
      ] })
    ] })
  ] });
}
export {
  xe as default
};
//# sourceMappingURL=index-B-O_lofh.js.map
