import { jsxs as t, jsx as e } from "react/jsx-runtime";
import { useState as m } from "react";
import { Link as T } from "react-router-dom";
import { useTranslation as C } from "react-i18next";
import { Building2 as p, Users as A, Briefcase as P, MapPin as u, ArrowLeft as S, Target as j, Lightbulb as E, ChevronDown as h, Search as k, GitMerge as x, Plus as B, Check as b, Cloud as L, Edit2 as M, PowerOff as G, Power as R, Trash2 as q, AlertTriangle as U, History as $, Info as D } from "lucide-react";
const f = [
  { name: "Acme Corporation SA", code: "ACME", description: "Siège principal Suisse", source: "entra", userCount: 42, status: "active" },
  { name: "TechVision GmbH", code: "TECHV", description: "Filiale Allemagne", source: "entra", userCount: 18, status: "active" },
  { name: "InnoSuisse Sàrl", code: "INNOS", description: "Division Innovation", source: "manual", userCount: 7, status: "active" },
  { name: "DataCorp SAS", code: "DATAC", description: "", source: "manual", userCount: 0, status: "inactive" },
  { name: "AlphaNet BV", code: "ALPHA", description: "Partenaire Benelux", source: "manual", userCount: 3, status: "active" }
], v = [
  { name: "Siège Zurich", code: "ZRH", city: "Zurich", country: "CH", source: "entra", userCount: 34, status: "active" },
  { name: "Bureau Genève", code: "GVA", city: "Genève", country: "CH", source: "manual", userCount: 12, status: "active" },
  { name: "Office Berlin", code: "BER", city: "Berlin", country: "DE", source: "entra", userCount: 8, status: "active" }
], H = [
  { date: "2026-02-20", target: "TechVision GmbH", sources: ["TechVision AG", "TechVision Ltd"], usersAffected: 6, operator: "admin@acme.ch" },
  { date: "2026-01-15", target: "Département Marketing", sources: ["Marketing Digital"], usersAffected: 3, operator: "rh@acme.ch" }
], O = [
  { method: "GET", path: "/api/administration/users/references/companies", handler: "GetCompanies", permission: "administration.users.read" },
  { method: "POST", path: "/api/administration/users/references/companies", handler: "CreateCompany", permission: "administration.users.update" },
  { method: "PUT", path: "/api/administration/users/references/companies/{id}", handler: "UpdateCompany", permission: "administration.users.update" },
  { method: "PATCH", path: "/api/administration/users/references/companies/{id}/activate", handler: "ActivateCompany", permission: "administration.users.update" },
  { method: "PATCH", path: "/api/administration/users/references/companies/{id}/deactivate", handler: "DeactivateCompany", permission: "administration.users.update" },
  { method: "DELETE", path: "/api/administration/users/references/companies/{id}", handler: "DeleteCompany", permission: "administration.users.delete" },
  { method: "GET", path: "/api/administration/users/references/departments", handler: "GetDepartments", permission: "administration.users.read" },
  { method: "POST", path: "/api/administration/users/references/departments", handler: "CreateDepartment", permission: "administration.users.update" },
  { method: "PUT", path: "/api/administration/users/references/departments/{id}", handler: "UpdateDepartment", permission: "administration.users.update" },
  { method: "GET", path: "/api/administration/users/references/job-titles", handler: "GetJobTitles", permission: "administration.users.read" },
  { method: "POST", path: "/api/administration/users/references/job-titles", handler: "CreateJobTitle", permission: "administration.users.update" },
  { method: "PUT", path: "/api/administration/users/references/job-titles/{id}", handler: "UpdateJobTitle", permission: "administration.users.update" },
  { method: "GET", path: "/api/administration/users/references/offices", handler: "GetOffices", permission: "administration.users.read" },
  { method: "POST", path: "/api/administration/users/references/offices", handler: "CreateOffice", permission: "administration.users.update" },
  { method: "PUT", path: "/api/administration/users/references/offices/{id}", handler: "UpdateOffice", permission: "administration.users.update" },
  { method: "POST", path: "/api/administration/users/references/merge", handler: "MergeReferences", permission: "administration.users.update" },
  { method: "POST", path: "/api/administration/users/references/merge/preview", handler: "PreviewMerge", permission: "administration.users.read" },
  { method: "GET", path: "/api/administration/users/references/merge/history", handler: "GetMergeHistory", permission: "administration.users.read" }
], V = [
  { id: "BR-001", category: "Validation", statement: "Le code est obligatoire à la création et ne peut pas être modifié après coup — il sert d'identifiant technique unique." },
  { id: "BR-002", category: "Validation", statement: "Le nom d'affichage est obligatoire pour toute référence (société, département, poste, bureau)." },
  { id: "BR-003", category: "Scope", statement: "Les référentiels sont strictement scoped au tenant sélectionné — aucune vue globale multi-tenant n'est possible." },
  { id: "BR-004", category: "Sécurité", statement: "Les références synchronisées depuis Microsoft Entra ID sont en lecture seule : nom et code ne peuvent pas être modifiés manuellement." },
  { id: "BR-005", category: "Logique métier", statement: "Une référence ne peut être supprimée que si aucun utilisateur ne lui est affecté (userCount = 0). Une référence Entra ne peut jamais être supprimée manuellement." },
  { id: "BR-006", category: "Fusion", statement: "La fusion (Merge) transfère tous les utilisateurs des référentiels source vers la référence cible, puis désactive les sources fusionnées." },
  { id: "BR-007", category: "Fusion", statement: "Une prévisualisation est disponible avant toute fusion : elle indique le nombre exact d'utilisateurs qui seront réaffectés." },
  { id: "BR-008", category: "Bureaux", statement: "Les bureaux disposent de champs supplémentaires (adresse, ville, pays) qui n'existent pas pour les autres types de référentiel." },
  { id: "BR-009", category: "Logique métier", statement: "Une référence désactivée reste visible dans la liste mais n'est plus proposée lors de l'affectation des utilisateurs." }
], F = {
  GET: "bg-blue-500/10 text-blue-700 border-blue-500/20",
  POST: "bg-green-500/10 text-green-700 border-green-500/20",
  PUT: "bg-amber-500/10 text-amber-700 border-amber-500/20",
  PATCH: "bg-purple-500/10 text-purple-700 border-purple-500/20",
  DELETE: "bg-red-500/10 text-red-700 border-red-500/20"
}, I = {
  Validation: "bg-blue-500/10 text-blue-700",
  Scope: "bg-purple-500/10 text-purple-700",
  Sécurité: "bg-red-500/10 text-red-700",
  "Logique métier": "bg-green-500/10 text-green-700",
  Fusion: "bg-amber-500/10 text-amber-700",
  Bureaux: "bg-teal-500/10 text-teal-700"
};
function s({ text: r }) {
  return /* @__PURE__ */ t("div", { className: "flex items-start gap-2 p-2.5 rounded-lg bg-blue-500/5 border border-blue-500/15 text-sm text-blue-700 dark:text-blue-400", children: [
    /* @__PURE__ */ e(D, { className: "w-4 h-4 mt-0.5 flex-shrink-0" }),
    /* @__PURE__ */ e("span", { children: r })
  ] });
}
function Q() {
  const { t: r } = C("docsAdministrationUsersReferences"), [c, g] = m("companies"), [n, y] = m(!1), [o, N] = m(!1), w = [
    { id: "companies", label: r("tabs.companies"), icon: p, count: f.length },
    { id: "departments", label: r("tabs.departments"), icon: A, count: 8 },
    { id: "jobTitles", label: r("tabs.jobTitles"), icon: P, count: 12 },
    { id: "offices", label: r("tabs.offices"), icon: u, count: v.length }
  ];
  return /* @__PURE__ */ t("div", { className: "space-y-8", children: [
    /* @__PURE__ */ t(
      T,
      {
        to: "/docs/business/administration/users",
        className: "inline-flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)] transition-colors",
        children: [
          /* @__PURE__ */ e(S, { className: "w-4 h-4" }),
          r("nav.backToUsers")
        ]
      }
    ),
    /* @__PURE__ */ t("div", { children: [
      /* @__PURE__ */ t("h1", { className: "text-3xl font-bold mb-4 flex items-center gap-3", children: [
        /* @__PURE__ */ e(p, { className: "w-8 h-8 text-[var(--color-primary-600)]" }),
        r("title")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-xl text-[var(--color-primary-600)] font-medium mb-2", children: r("valueProposition") }),
      /* @__PURE__ */ e("p", { className: "text-lg text-[var(--text-secondary)]", children: r("subtitle") }),
      /* @__PURE__ */ t("div", { className: "flex gap-4 mt-3 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ t("span", { children: [
          "9 ",
          r("header.businessRules")
        ] }),
        /* @__PURE__ */ t("span", { children: [
          "18 ",
          r("header.apiEndpoints")
        ] }),
        /* @__PURE__ */ t("span", { children: [
          "4 ",
          r("header.referenceTypes")
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "valeur", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "1" }),
        r("sections.businessValue")
      ] }),
      /* @__PURE__ */ t("div", { className: "card p-6", children: [
        /* @__PURE__ */ t("div", { className: "mb-6", children: [
          /* @__PURE__ */ t("h3", { className: "font-semibold mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(j, { className: "w-5 h-5 text-red-500" }),
            r("sections.problem")
          ] }),
          /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("problem") })
        ] }),
        /* @__PURE__ */ t("div", { className: "p-4 rounded-lg bg-green-500/10 border border-green-500/20", children: [
          /* @__PURE__ */ t("h3", { className: "font-semibold mb-2 flex items-center gap-2 text-green-700", children: [
            /* @__PURE__ */ e(E, { className: "w-5 h-5" }),
            r("sections.solution")
          ] }),
          /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r("solution") })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "acces", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "2" }),
        r("sections.access")
      ] }),
      /* @__PURE__ */ t("div", { className: "card p-6 space-y-4", children: [
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-secondary)] mb-2", children: r("access.navigation") }),
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-sm flex-wrap", children: [
            /* @__PURE__ */ e("span", { className: "px-3 py-1.5 rounded-lg bg-purple-500/10 text-purple-600 font-medium", children: "Platform" }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)]", children: "›" }),
            /* @__PURE__ */ e("span", { className: "px-3 py-1.5 rounded-lg bg-blue-500/10 text-blue-600 font-medium", children: "Administration" }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)]", children: "›" }),
            /* @__PURE__ */ e("span", { className: "px-3 py-1.5 rounded-lg bg-green-500/10 text-green-600 font-medium", children: r("access.usersModule") }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)]", children: "›" }),
            /* @__PURE__ */ e("span", { className: "px-3 py-1.5 rounded-lg bg-amber-500/10 text-amber-700 font-medium", children: r("title") })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-secondary)] mb-1", children: "URL" }),
          /* @__PURE__ */ e("code", { className: "text-sm px-3 py-1.5 bg-[var(--bg-secondary)] rounded-lg", children: "/administration/users/references" })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-secondary)] mb-1", children: r("access.permission") }),
          /* @__PURE__ */ e("code", { className: "text-sm px-3 py-1.5 bg-[var(--bg-secondary)] rounded-lg", children: "administration.users.read" })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "interface", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "3" }),
        r("sections.interface")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: r("interface.desc") }),
      /* @__PURE__ */ t("div", { className: "card overflow-hidden mb-4", children: [
        /* @__PURE__ */ t("div", { className: "p-4 border-b border-[var(--border-color)] bg-[var(--bg-secondary)]", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 text-xs text-[var(--text-secondary)] mb-2", children: [
            /* @__PURE__ */ e("span", { children: "Administration" }),
            /* @__PURE__ */ e("span", { children: "›" }),
            /* @__PURE__ */ e("span", { children: r("access.usersModule") }),
            /* @__PURE__ */ e("span", { children: "›" }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-primary)]", children: r("title") })
          ] }),
          /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: r("title") }),
            /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: r("interface.headerSubtitle") })
          ] }) })
        ] }),
        /* @__PURE__ */ e("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-3 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-sm", children: [
          /* @__PURE__ */ e(p, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
          /* @__PURE__ */ e("span", { className: "font-medium text-[var(--text-primary)]", children: "Acme Corp SA" }),
          /* @__PURE__ */ e(h, { className: "w-4 h-4 text-[var(--text-tertiary)] ml-auto" })
        ] }) }),
        /* @__PURE__ */ e("div", { className: "flex gap-0 border-b border-[var(--border-color)] px-4", children: w.map((a) => {
          const i = a.icon;
          return /* @__PURE__ */ t(
            "button",
            {
              onClick: () => g(a.id),
              className: `flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors border-b-2 -mb-px ${c === a.id ? "border-[var(--color-accent-500)] text-[var(--color-accent-600)]" : "border-transparent text-[var(--text-secondary)]"}`,
              children: [
                /* @__PURE__ */ e(i, { className: "w-4 h-4" }),
                a.label,
                /* @__PURE__ */ e("span", { className: "text-xs px-1.5 py-0.5 rounded-full bg-[var(--bg-secondary)] text-[var(--text-secondary)]", children: a.count })
              ]
            },
            a.id
          );
        }) }),
        /* @__PURE__ */ t("div", { className: "flex items-center gap-3 p-4", children: [
          /* @__PURE__ */ t("div", { className: "relative flex-1 max-w-xs", children: [
            /* @__PURE__ */ e(k, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--text-tertiary)]" }),
            /* @__PURE__ */ e("div", { className: "pl-9 pr-4 py-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-sm text-[var(--text-tertiary)]", children: r("interface.searchPlaceholder") })
          ] }),
          /* @__PURE__ */ e("div", { className: "px-3 py-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-sm text-[var(--text-secondary)]", children: r("interface.statusFilter") }),
          /* @__PURE__ */ e("div", { className: "px-3 py-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-sm text-[var(--text-secondary)]", children: r("interface.sourceFilter") }),
          /* @__PURE__ */ t("div", { className: "flex items-center gap-1 ml-auto", children: [
            /* @__PURE__ */ t(
              "button",
              {
                onClick: () => y(!n),
                className: `flex items-center gap-2 px-3 py-2 rounded-lg text-sm border transition-colors ${n ? "bg-amber-500/10 text-amber-700 border-amber-500/20" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)] border-[var(--border-color)]"}`,
                children: [
                  /* @__PURE__ */ e(x, { className: "w-4 h-4" }),
                  r("interface.mergeMode")
                ]
              }
            ),
            /* @__PURE__ */ t("button", { className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-[var(--color-accent-600)] text-white text-sm", children: [
              /* @__PURE__ */ e(B, { className: "w-4 h-4" }),
              r("interface.addButton")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ e("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden", children: /* @__PURE__ */ t("table", { className: "w-full text-sm", children: [
          /* @__PURE__ */ e("thead", { className: "bg-[var(--bg-secondary)]", children: /* @__PURE__ */ t("tr", { children: [
            n && /* @__PURE__ */ e("th", { className: "w-10 px-4 py-3" }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.name") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.code") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.source") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.users") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.status") }),
            c === "offices" && /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.location") }),
            /* @__PURE__ */ e("th", { className: "text-right px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase", children: r("interface.columns.actions") })
          ] }) }),
          /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: (c === "offices" ? v : f).map((a, i) => {
            const d = a.source === "entra", l = a.status === "active";
            return /* @__PURE__ */ t("tr", { className: "hover:bg-[var(--bg-hover)] transition-colors", children: [
              n && /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e("div", { className: `w-4 h-4 rounded border-2 ${i === 1 ? "bg-[var(--color-accent-500)] border-[var(--color-accent-500)]" : "border-[var(--border-color)]"} flex items-center justify-center`, children: i === 1 && /* @__PURE__ */ e(b, { className: "w-3 h-3 text-white" }) }) }),
              /* @__PURE__ */ t("td", { className: "px-4 py-3", children: [
                /* @__PURE__ */ e("div", { className: "font-medium text-[var(--text-primary)]", children: a.name }),
                "description" in a && a.description && /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-tertiary)]", children: a.description })
              ] }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e("code", { className: "text-xs bg-[var(--bg-secondary)] px-2 py-0.5 rounded", children: a.code }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: d ? /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-[var(--info-bg)] text-[var(--info-text)]", children: [
                /* @__PURE__ */ e(L, { className: "w-3 h-3" }),
                "Entra"
              ] }) : /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-[var(--bg-secondary)] text-[var(--text-secondary)]", children: r("interface.sourceManual") }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 text-[var(--text-primary)]", children: a.userCount }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${l ? "bg-green-500/10 text-green-700 border border-green-500/20" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)]"}`, children: r(l ? "interface.statusActive" : "interface.statusInactive") }) }),
              c === "offices" && /* @__PURE__ */ e("td", { className: "px-4 py-3 text-sm text-[var(--text-secondary)]", children: "city" in a ? `${a.city}, ${a.country}` : "—" }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-end gap-1", children: [
                !d && /* @__PURE__ */ e("button", { className: "p-1.5 rounded hover:bg-[var(--bg-secondary)] text-[var(--text-secondary)]", children: /* @__PURE__ */ e(M, { className: "w-3.5 h-3.5" }) }),
                /* @__PURE__ */ e("button", { className: `p-1.5 rounded hover:bg-[var(--bg-secondary)] ${l ? "text-amber-600" : "text-green-600"}`, children: l ? /* @__PURE__ */ e(G, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ e(R, { className: "w-3.5 h-3.5" }) }),
                !d && a.userCount === 0 && /* @__PURE__ */ e("button", { className: "p-1.5 rounded hover:bg-[var(--bg-secondary)] text-red-500", children: /* @__PURE__ */ e(q, { className: "w-3.5 h-3.5" }) }),
                d && /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-tertiary)] italic px-2", children: r("interface.entraManaged") })
              ] }) })
            ] }, i);
          }) })
        ] }) }) }),
        n && /* @__PURE__ */ t("div", { className: "mx-4 mb-4 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20 flex items-center gap-3", children: [
          /* @__PURE__ */ e(U, { className: "w-4 h-4 text-amber-600" }),
          /* @__PURE__ */ t("span", { className: "text-sm text-amber-700", children: [
            "1 ",
            r("interface.mergeSelected")
          ] }),
          /* @__PURE__ */ t("button", { className: "ml-auto flex items-center gap-2 px-3 py-1.5 rounded-lg bg-amber-600 text-white text-sm", children: [
            /* @__PURE__ */ e(x, { className: "w-4 h-4" }),
            r("interface.mergeTo")
          ] })
        ] })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2", children: [
        /* @__PURE__ */ e(s, { text: r("annotations.tenantScope") }),
        /* @__PURE__ */ e(s, { text: r("annotations.tabs") }),
        /* @__PURE__ */ e(s, { text: r("annotations.entraProtection") }),
        /* @__PURE__ */ e(s, { text: r("annotations.deleteCondition") }),
        /* @__PURE__ */ e(s, { text: r("annotations.mergeMode") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "formulaire", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "4" }),
        r("sections.createForm")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: r("form.desc") }),
      /* @__PURE__ */ t("div", { className: "card p-6 mb-4 max-w-lg", children: [
        /* @__PURE__ */ e("h3", { className: "text-lg font-semibold mb-4", children: r("form.title") }),
        /* @__PURE__ */ t("div", { className: "space-y-4", children: [
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-[var(--text-secondary)] mb-1", children: [
              r("form.codeLabel"),
              " *"
            ] }),
            /* @__PURE__ */ e("div", { className: "px-3 py-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-sm text-[var(--text-tertiary)]", children: r("form.codePlaceholder") }),
            /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-tertiary)] mt-1", children: r("form.codeHint") })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-[var(--text-secondary)] mb-1", children: [
              r("form.nameLabel"),
              " *"
            ] }),
            /* @__PURE__ */ e("div", { className: "px-3 py-2 rounded-lg border border-[var(--color-accent-500)] bg-[var(--bg-primary)] text-sm text-[var(--text-primary)]", children: "Acme Corporation SA" })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("label", { className: "block text-sm font-medium text-[var(--text-secondary)] mb-1", children: r("form.descriptionLabel") }),
            /* @__PURE__ */ e("div", { className: "px-3 py-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-sm text-[var(--text-tertiary)] h-16", children: r("form.descriptionPlaceholder") })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)] text-xs text-[var(--text-secondary)]", children: [
            /* @__PURE__ */ e(u, { className: "w-3.5 h-3.5 inline mr-1" }),
            r("form.officeFieldsNote")
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "flex justify-end gap-3 mt-6", children: [
          /* @__PURE__ */ e("button", { className: "px-4 py-2 rounded-lg bg-[var(--bg-secondary)] text-[var(--text-secondary)] text-sm", children: r("form.cancel") }),
          /* @__PURE__ */ e("button", { className: "px-4 py-2 rounded-lg bg-[var(--color-accent-600)] text-white text-sm", children: r("form.save") })
        ] })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2", children: [
        /* @__PURE__ */ e(s, { text: r("annotations.codeImmutable") }),
        /* @__PURE__ */ e(s, { text: r("annotations.officeExtraFields") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "fusion", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "5" }),
        r("sections.mergeFeature")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: r("merge.desc") }),
      /* @__PURE__ */ t("div", { className: "grid md:grid-cols-2 gap-6 mb-4", children: [
        /* @__PURE__ */ t("div", { className: "card p-5", children: [
          /* @__PURE__ */ t("h3", { className: "font-semibold mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(x, { className: "w-4 h-4 text-amber-600" }),
            r("merge.previewTitle")
          ] }),
          /* @__PURE__ */ t("div", { className: "space-y-3 text-sm", children: [
            /* @__PURE__ */ t("div", { children: [
              /* @__PURE__ */ e("div", { className: "text-[var(--text-secondary)] mb-1", children: r("merge.target") }),
              /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-green-500/10 border border-green-500/20 font-medium text-green-700", children: "TechVision GmbH" })
            ] }),
            /* @__PURE__ */ t("div", { children: [
              /* @__PURE__ */ e("div", { className: "text-[var(--text-secondary)] mb-1", children: r("merge.sources") }),
              /* @__PURE__ */ t("div", { className: "space-y-1", children: [
                /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-red-500/5 border border-red-500/15 text-[var(--text-primary)]", children: "TechVision AG" }),
                /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-red-500/5 border border-red-500/15 text-[var(--text-primary)]", children: "TechVision Ltd" })
              ] })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700", children: [
              /* @__PURE__ */ t("span", { className: "font-semibold", children: [
                "6 ",
                r("merge.usersAffected")
              ] }),
              " — ",
              r("merge.usersWillBeReassigned")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "card p-5", children: [
          /* @__PURE__ */ t("h3", { className: "font-semibold mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e($, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
            r("merge.historyTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "space-y-3", children: H.map((a, i) => /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)] text-sm", children: [
            /* @__PURE__ */ t("div", { className: "flex items-start justify-between", children: [
              /* @__PURE__ */ t("div", { children: [
                /* @__PURE__ */ e("div", { className: "font-medium text-[var(--text-primary)]", children: a.target }),
                /* @__PURE__ */ t("div", { className: "text-xs text-[var(--text-tertiary)]", children: [
                  "← ",
                  a.sources.join(", ")
                ] })
              ] }),
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-tertiary)]", children: a.date })
            ] }),
            /* @__PURE__ */ t("div", { className: "mt-1 text-xs text-[var(--text-secondary)]", children: [
              a.usersAffected,
              " ",
              r("merge.usersAffected"),
              " · ",
              a.operator
            ] })
          ] }, i)) })
        ] })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2", children: [
        /* @__PURE__ */ e(s, { text: r("annotations.mergePreview") }),
        /* @__PURE__ */ e(s, { text: r("annotations.mergeHistory") }),
        /* @__PURE__ */ e(s, { text: r("annotations.mergeIrreversible") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "usecases", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "6" }),
        r("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid md:grid-cols-3 gap-4", children: ["uc1", "uc2", "uc3"].map((a) => /* @__PURE__ */ t("div", { className: "card p-5", children: [
        /* @__PURE__ */ e("div", { className: "font-semibold mb-1 text-[var(--color-primary-600)]", children: r(`useCases.${a}.persona`) }),
        /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-primary)] mb-2", children: r(`useCases.${a}.goal`) }),
        /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: r(`useCases.${a}.scenario`) })
      ] }, a)) })
    ] }),
    /* @__PURE__ */ t("section", { id: "fonctionnalites", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "7" }),
        r("sections.features")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid md:grid-cols-2 gap-4", children: ["f1", "f2", "f3", "f4", "f5"].map((a) => /* @__PURE__ */ t("div", { className: "card p-5 flex gap-3", children: [
        /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(b, { className: "w-4 h-4 text-[var(--color-primary-600)]" }) }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "font-medium text-[var(--text-primary)] mb-1", children: r(`features.${a}.title`) }),
          /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: r(`features.${a}.desc`) })
        ] })
      ] }, a)) })
    ] }),
    /* @__PURE__ */ t("section", { id: "faq", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t("h2", { className: "text-2xl font-bold mb-4 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "8" }),
        r("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-4", children: ["q1", "q2", "q3", "q4", "q5"].map((a) => /* @__PURE__ */ t("div", { className: "card p-5", children: [
        /* @__PURE__ */ e("h3", { className: "font-medium text-[var(--text-primary)] mb-2", children: r(`faq.${a}.question`) }),
        /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: r(`faq.${a}.answer`) })
      ] }, a)) })
    ] }),
    /* @__PURE__ */ t("section", { id: "technique", className: "scroll-mt-4", children: [
      /* @__PURE__ */ t(
        "button",
        {
          onClick: () => N(!o),
          className: "w-full flex items-center justify-between text-2xl font-bold p-4 card hover:bg-[var(--bg-secondary)] transition-colors",
          children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm", children: "9" }),
              r("sections.technicalRef")
            ] }),
            /* @__PURE__ */ e(h, { className: `w-5 h-5 text-[var(--text-secondary)] transition-transform ${o ? "rotate-180" : ""}` })
          ]
        }
      ),
      o && /* @__PURE__ */ t("div", { className: "card p-6 mt-2 space-y-6", children: [
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h3", { className: "font-semibold text-lg mb-3", children: r("tech.businessRules") }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: V.map((a) => /* @__PURE__ */ t("div", { className: "flex items-start gap-3 p-3 rounded-lg border border-[var(--border-color)]", children: [
            /* @__PURE__ */ e("code", { className: "text-xs px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-secondary)] flex-shrink-0 mt-0.5", children: a.id }),
            /* @__PURE__ */ e("span", { className: `text-xs px-2 py-0.5 rounded font-medium flex-shrink-0 mt-0.5 ${I[a.category] || "bg-gray-100 text-gray-600"}`, children: a.category }),
            /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: a.statement })
          ] }, a.id)) })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h3", { className: "font-semibold text-lg mb-3", children: r("tech.apiEndpoints") }),
          /* @__PURE__ */ e("div", { className: "space-y-1.5", children: O.map((a, i) => /* @__PURE__ */ t("div", { className: "flex items-center gap-3 text-sm p-2 rounded-lg hover:bg-[var(--bg-secondary)] transition-colors", children: [
            /* @__PURE__ */ e("span", { className: `px-2 py-0.5 rounded text-xs font-mono font-bold border ${F[a.method]}`, children: a.method }),
            /* @__PURE__ */ e("code", { className: "flex-1 text-xs text-[var(--text-primary)] truncate", children: a.path }),
            /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-tertiary)] hidden lg:block", children: a.handler }),
            /* @__PURE__ */ e("code", { className: "text-xs px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-tertiary)] hidden xl:block", children: a.permission })
          ] }, i)) })
        ] })
      ] })
    ] })
  ] });
}
export {
  Q as default
};
//# sourceMappingURL=index-CU66n-zU.js.map
