import { jsxs as t, jsx as e } from "react/jsx-runtime";
import { Link as m } from "react-router-dom";
import { useTranslation as f } from "react-i18next";
import { ArrowLeft as x, ShieldCheck as p, Target as y, Lightbulb as w, Filter as A, XCircle as i, CheckCircle2 as d, Clock as C, Users as c, Building2 as b, AppWindow as h, UserCheck as u, Check as R, ChevronDown as N, Info as M } from "lucide-react";
const $ = [
  { user: "Alice Martin", email: "alice@acme.ch", tenant: "Acme Corp", app: "CRM Pro", reason: "Gestion des clients Enterprise", date: "2026-03-01", status: "Pending" },
  { user: "Bob Dupont", email: "bob@techvision.ch", tenant: "TechVision", app: "BI Analytics", reason: "Rapports mensuels direction", date: "2026-02-28", status: "Approved" },
  { user: "Carmen Rossi", email: "carmen@innosuisse.ch", tenant: "InnoSuisse", app: "Portail RH", reason: "Accès données RH département", date: "2026-02-25", status: "Denied" },
  { user: "David Müller", email: "david@datacorp.fr", tenant: "DataCorp", app: "API Manager", reason: "Intégration données partenaire", date: "2026-03-02", status: "Pending" },
  { user: "Emma Schäfer", email: "emma@alphanet.ch", tenant: "AlphaNet", app: "Rapports Q1", reason: "Analyse performance trimestrielle", date: "2026-03-01", status: "Pending" }
], v = { pending: 3, approved: 1, denied: 1 }, k = [
  { app: "CRM Pro", tenant: "Acme Corp", reason: "Gestion des clients Enterprise", date: "2026-03-01", status: "Pending", processedAt: "-", notes: "-" },
  { app: "BI Analytics", tenant: "TechVision", reason: "Rapports mensuels", date: "2026-02-15", status: "Approved", processedAt: "2026-02-16", notes: "-" },
  { app: "Portail Finance", tenant: "InnoSuisse", reason: "Budget prévisionnel", date: "2026-01-20", status: "Denied", processedAt: "2026-01-21", notes: "Accès réservé au département finance uniquement." }
], T = [
  { method: "POST", path: "/api/tenants/{tenantId}/applications/{appId}/request", handler: "CreateAccessRequest", permission: "authenticated" },
  { method: "GET", path: "/api/access-requests", handler: "GetAllAccessRequests", permission: "authenticated" },
  { method: "GET", path: "/api/tenants/{tenantId}/access-requests", handler: "GetTenantAccessRequests", permission: "authenticated" },
  { method: "GET", path: "/api/applications/{appId}/access-requests", handler: "GetAppAccessRequests", permission: "authenticated" },
  { method: "GET", path: "/api/my/access-requests", handler: "GetMyAccessRequests", permission: "authenticated" },
  { method: "POST", path: "/api/access-requests/{requestId}/approve", handler: "ApproveAccessRequest", permission: "administration.access-requests.approve" },
  { method: "POST", path: "/api/access-requests/{requestId}/deny", handler: "DenyAccessRequest", permission: "administration.access-requests.deny" }
], g = {
  Pending: { bg: "bg-amber-500/10", text: "text-amber-700", border: "border-amber-500/20", icon: C },
  Approved: { bg: "bg-green-500/10", text: "text-green-700", border: "border-green-500/20", icon: d },
  Denied: { bg: "bg-red-500/10", text: "text-red-700", border: "border-red-500/20", icon: i }
};
function r({ text: a }) {
  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(M, { className: "w-4 h-4 mt-0.5 flex-shrink-0" }),
    /* @__PURE__ */ e("span", { children: a })
  ] });
}
function I() {
  const { t: a } = f("docsAdministrationTenantsAccessRequests");
  return /* @__PURE__ */ t("div", { className: "space-y-8", children: [
    /* @__PURE__ */ t(
      m,
      {
        to: "/docs/business/administration/tenants",
        className: "inline-flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)] transition-colors",
        children: [
          /* @__PURE__ */ e(x, { className: "w-4 h-4" }),
          a("nav.backToTenants")
        ]
      }
    ),
    /* @__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)]" }),
        a("title")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-xl text-[var(--color-primary-600)] font-medium mb-2", children: a("valueProposition") }),
      /* @__PURE__ */ e("p", { className: "text-lg text-[var(--text-secondary)]", children: a("subtitle") }),
      /* @__PURE__ */ t("div", { className: "flex gap-4 mt-3 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ t("span", { children: [
          "7 ",
          a("header.businessRules")
        ] }),
        /* @__PURE__ */ t("span", { children: [
          "7 ",
          a("header.apiEndpoints")
        ] }),
        /* @__PURE__ */ t("span", { children: [
          "3 ",
          a("header.statuses")
        ] })
      ] })
    ] }),
    /* @__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" }),
        a("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(y, { className: "w-5 h-5 text-red-500" }),
            a("sections.problem")
          ] }),
          /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: a("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(w, { className: "w-5 h-5" }),
            a("sections.solution")
          ] }),
          /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: a("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" }),
        a("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: a("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: "Tenants" }),
            /* @__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: a("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/tenants/access-requests" })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-medium text-[var(--text-secondary)] mb-1", children: a("access.permission") }),
          /* @__PURE__ */ e("code", { className: "text-sm px-3 py-1.5 bg-[var(--bg-secondary)] rounded-lg", children: "administration.access-requests.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" }),
        a("sections.interface")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: a("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-3", children: [
            /* @__PURE__ */ e("span", { children: "Administration" }),
            /* @__PURE__ */ e("span", { children: "›" }),
            /* @__PURE__ */ e("span", { children: "Tenants" }),
            /* @__PURE__ */ e("span", { children: "›" }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-primary)]", children: a("title") })
          ] }),
          /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
            /* @__PURE__ */ e(p, { className: "w-6 h-6 text-[var(--color-primary-600)]" }),
            /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: a("title") })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-4 p-4", children: [
          /* @__PURE__ */ t("div", { className: "rounded-lg p-4 bg-[var(--bg-card)] border border-amber-500/20", children: [
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-amber-700", children: v.pending }),
            /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-secondary)]", children: a("interface.stats.pending") })
          ] }),
          /* @__PURE__ */ t("div", { className: "rounded-lg p-4 bg-[var(--bg-card)] border border-green-500/20", children: [
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-green-700", children: v.approved }),
            /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-secondary)]", children: a("interface.stats.approved") })
          ] }),
          /* @__PURE__ */ t("div", { className: "rounded-lg p-4 bg-[var(--bg-card)] border border-red-500/20", children: [
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-red-600", children: v.denied }),
            /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-secondary)]", children: a("interface.stats.denied") })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
          /* @__PURE__ */ e(A, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
          /* @__PURE__ */ e("div", { className: "flex gap-1", children: ["all", "Pending", "Approved", "Denied"].map((s) => /* @__PURE__ */ e(
            "button",
            {
              className: `px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${s === "Pending" ? "bg-[var(--color-accent-500)] text-white" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)]"}`,
              children: a(s === "all" ? "interface.filter.all" : `interface.filter.${s.toLowerCase()}`)
            },
            s
          )) })
        ] }) }),
        /* @__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: [
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: a("interface.columns.user") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden md:table-cell", children: a("interface.columns.tenant") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: a("interface.columns.application") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden xl:table-cell", children: a("interface.columns.reason") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: a("interface.columns.date") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: a("interface.columns.status") }),
            /* @__PURE__ */ e("th", { className: "text-center px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: a("interface.columns.actions") })
          ] }) }),
          /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: $.map((s, l) => {
            const n = g[s.status], o = n.icon;
            return /* @__PURE__ */ t("tr", { className: "hover:bg-[var(--bg-hover)] transition-colors", children: [
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(c, { className: "w-4 h-4 text-[var(--text-secondary)]" }) }),
                /* @__PURE__ */ t("div", { children: [
                  /* @__PURE__ */ e("div", { className: "font-medium text-[var(--text-primary)] text-sm", children: s.user }),
                  /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-tertiary)]", children: s.email })
                ] })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden md:table-cell", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
                /* @__PURE__ */ e(b, { className: "w-3.5 h-3.5 text-[var(--text-secondary)]" }),
                /* @__PURE__ */ e("span", { className: "text-sm text-[var(--text-primary)]", children: s.tenant })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden lg:table-cell", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: [
                /* @__PURE__ */ e(h, { className: "w-3.5 h-3.5 text-[var(--color-primary-600)]" }),
                /* @__PURE__ */ e("span", { className: "text-sm", children: s.app })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden xl:table-cell", children: /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-secondary)] line-clamp-1", children: s.reason }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden lg:table-cell", children: /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-secondary)]", children: s.date }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ t("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border ${n.bg} ${n.text} ${n.border}`, children: [
                /* @__PURE__ */ e(o, { className: "w-3 h-3" }),
                a(`interface.status.${s.status.toLowerCase()}`)
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 text-center", children: s.status === "Pending" ? /* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-1", children: [
                /* @__PURE__ */ t("button", { className: "inline-flex items-center gap-1 px-2.5 py-1 rounded-lg bg-green-500/10 text-green-700 text-xs font-medium hover:bg-green-500/20 transition-colors", children: [
                  /* @__PURE__ */ e(d, { className: "w-3.5 h-3.5" }),
                  a("interface.approveBtn")
                ] }),
                /* @__PURE__ */ t("button", { className: "inline-flex items-center gap-1 px-2.5 py-1 rounded-lg bg-red-500/10 text-red-600 text-xs font-medium hover:bg-red-500/20 transition-colors", children: [
                  /* @__PURE__ */ e(i, { className: "w-3.5 h-3.5" }),
                  a("interface.denyBtn")
                ] })
              ] }) : /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)] text-xs", children: "-" }) })
            ] }, `req-${l}`);
          }) })
        ] }) }) })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2", children: [
        /* @__PURE__ */ e(r, { text: a("interface.annotations.stats") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.filterButtons") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.userCol") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.tenantCol") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.appCol") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.reasonCol") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.statusCol") }),
        /* @__PURE__ */ e(r, { text: a("interface.annotations.actionsCol") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "traitement", 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" }),
        a("sections.approvalModal")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: a("approvalModal.desc") }),
      /* @__PURE__ */ t("div", { className: "card p-6 space-y-5", children: [
        /* @__PURE__ */ t("div", { className: "p-4 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)]", children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-secondary)] mb-3", children: a("approvalModal.requestInfo") }),
          /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3 text-sm", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e(c, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
              /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)]", children: "Alice Martin" }),
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-tertiary)]", children: "alice@acme.ch" })
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e(b, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
              /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)]", children: "Acme Corp" })
            ] }),
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e(h, { className: "w-4 h-4 text-[var(--color-primary-600)]" }),
              /* @__PURE__ */ e("span", { className: "font-medium", children: "CRM Pro" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] italic", children: '"Gestion des clients Enterprise"' })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ t("div", { className: "text-sm font-semibold mb-3 flex items-center gap-2 text-green-700", children: [
            /* @__PURE__ */ e(d, { className: "w-4 h-4" }),
            a("approvalModal.approveTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mb-3", children: a("approvalModal.assignMode") }),
          /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-3 mb-4", children: [
            /* @__PURE__ */ t("div", { className: "p-3 border-2 border-[var(--color-primary-600)]/30 bg-[var(--color-primary-600)]/5 rounded-lg", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
                /* @__PURE__ */ e(u, { className: "w-4 h-4 text-[var(--color-primary-600)]" }),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: a("approvalModal.assignRole") }),
                /* @__PURE__ */ e(R, { className: "w-4 h-4 text-[var(--color-primary-600)] ml-auto" })
              ] }),
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-3 py-2 bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-lg text-sm", children: [
                /* @__PURE__ */ e("span", { className: "flex-1 text-[var(--text-secondary)]", children: a("approvalModal.rolePlaceholder") }),
                /* @__PURE__ */ e(N, { className: "w-4 h-4 text-[var(--text-tertiary)]" })
              ] })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 border border-[var(--border-color)] rounded-lg", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
                /* @__PURE__ */ e(c, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[var(--text-secondary)]", children: a("approvalModal.assignGroup") })
              ] }),
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2 px-3 py-2 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-lg text-sm opacity-60", children: [
                /* @__PURE__ */ e("span", { className: "flex-1 text-[var(--text-tertiary)]", children: a("approvalModal.groupSelect") }),
                /* @__PURE__ */ e(N, { className: "w-4 h-4 text-[var(--text-tertiary)]" })
              ] })
            ] })
          ] }),
          /* @__PURE__ */ t("button", { className: "px-4 py-2 bg-green-600 text-white rounded-lg text-sm font-medium opacity-80 flex items-center gap-2", children: [
            /* @__PURE__ */ e(d, { className: "w-4 h-4" }),
            a("approvalModal.approveSubmit")
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "relative", children: [
          /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ e("div", { className: "w-full border-t border-[var(--border-color)]" }) }),
          /* @__PURE__ */ e("div", { className: "relative flex justify-center", children: /* @__PURE__ */ e("span", { className: "px-3 bg-[var(--bg-card)] text-xs text-[var(--text-tertiary)]", children: "ou" }) })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ t("div", { className: "text-sm font-semibold mb-3 flex items-center gap-2 text-red-600", children: [
            /* @__PURE__ */ e(i, { className: "w-4 h-4" }),
            a("approvalModal.denyTitle")
          ] }),
          /* @__PURE__ */ t("div", { className: "mb-3", children: [
            /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-[var(--text-secondary)] mb-1", children: a("approvalModal.notesLabel") }),
            /* @__PURE__ */ e(
              "textarea",
              {
                readOnly: !0,
                rows: 3,
                value: "",
                placeholder: a("approvalModal.notesPlaceholder"),
                className: "w-full px-3 py-2 text-sm border border-[var(--border-color)] rounded-lg bg-[var(--bg-primary)] text-[var(--text-tertiary)] resize-none"
              }
            )
          ] }),
          /* @__PURE__ */ t("button", { className: "px-4 py-2 bg-red-600/80 text-white rounded-lg text-sm font-medium opacity-80 flex items-center gap-2", children: [
            /* @__PURE__ */ e(i, { className: "w-4 h-4" }),
            a("approvalModal.denySubmit")
          ] })
        ] })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2 mt-4", children: [
        /* @__PURE__ */ e(r, { text: a("approvalModal.annotations.requestInfo") }),
        /* @__PURE__ */ e(r, { text: a("approvalModal.annotations.assignMode") }),
        /* @__PURE__ */ e(r, { text: a("approvalModal.annotations.roleList") }),
        /* @__PURE__ */ e(r, { text: a("approvalModal.annotations.denyReason") }),
        /* @__PURE__ */ e(r, { text: a("approvalModal.annotations.cacheUpdate") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "vue-utilisateur", 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" }),
        a("sections.userView")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-4", children: a("userView.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: "Mon Espace" }),
            /* @__PURE__ */ e("span", { children: "›" }),
            /* @__PURE__ */ e("span", { className: "text-[var(--text-primary)]", children: a("title") })
          ] }),
          /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-3 mt-3", children: [
            /* @__PURE__ */ t("div", { className: "p-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-center", children: [
              /* @__PURE__ */ e("div", { className: "text-lg font-bold text-amber-700", children: "1" }),
              /* @__PURE__ */ e("div", { className: "text-xs text-amber-700", children: a("interface.stats.pending") })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-2 rounded-lg bg-green-500/10 border border-green-500/20 text-center", children: [
              /* @__PURE__ */ e("div", { className: "text-lg font-bold text-green-700", children: "1" }),
              /* @__PURE__ */ e("div", { className: "text-xs text-green-700", children: a("interface.stats.approved") })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-2 rounded-lg bg-red-500/10 border border-red-500/20 text-center", children: [
              /* @__PURE__ */ e("div", { className: "text-lg font-bold text-red-600", children: "1" }),
              /* @__PURE__ */ e("div", { className: "text-xs text-red-600", children: a("interface.stats.denied") })
            ] })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t("table", { className: "w-full text-sm", children: [
          /* @__PURE__ */ e("thead", { className: "bg-[var(--bg-secondary)]", children: /* @__PURE__ */ t("tr", { children: [
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: a("userView.columns.application") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden md:table-cell", children: a("userView.columns.tenant") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: a("userView.columns.reason") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden md:table-cell", children: a("userView.columns.date") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: a("userView.columns.status") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden lg:table-cell", children: a("userView.columns.processedAt") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden xl:table-cell", children: a("userView.columns.notes") })
          ] }) }),
          /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: k.map((s, l) => {
            const n = g[s.status], o = n.icon;
            return /* @__PURE__ */ t("tr", { className: "hover:bg-[var(--bg-hover)] transition-colors", children: [
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e(h, { className: "w-4 h-4 text-[var(--color-primary-600)]" }),
                /* @__PURE__ */ e("span", { className: "font-medium", children: s.app })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden md:table-cell text-[var(--text-secondary)] text-sm", children: s.tenant }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden lg:table-cell text-xs text-[var(--text-secondary)]", children: s.reason }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden md:table-cell text-xs text-[var(--text-secondary)]", children: s.date }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ t("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border ${n.bg} ${n.text} ${n.border}`, children: [
                /* @__PURE__ */ e(o, { className: "w-3 h-3" }),
                a(`interface.status.${s.status.toLowerCase()}`)
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden lg:table-cell text-xs text-[var(--text-secondary)]", children: s.processedAt }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 hidden xl:table-cell", children: s.notes !== "-" ? /* @__PURE__ */ e("span", { className: "text-xs text-red-600 italic", children: s.notes }) : /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)]", children: "-" }) })
            ] }, `req-${l}`);
          }) })
        ] }) })
      ] }),
      /* @__PURE__ */ t("div", { className: "space-y-2", children: [
        /* @__PURE__ */ e(r, { text: a("userView.annotations.userView") }),
        /* @__PURE__ */ e(r, { text: a("userView.annotations.statusBadge") }),
        /* @__PURE__ */ e(r, { text: a("userView.annotations.notesCol") })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { id: "cas-usage", 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" }),
        a("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((s) => /* @__PURE__ */ t("div", { className: "card p-6", children: [
        /* @__PURE__ */ t("div", { className: "flex items-center gap-3 mb-4", children: [
          /* @__PURE__ */ e("div", { className: `w-12 h-12 rounded-full flex items-center justify-center ${{ 1: "bg-purple-500/10", 2: "bg-blue-500/10", 3: "bg-green-500/10" }[s]}`, children: /* @__PURE__ */ e(c, { className: `w-6 h-6 ${{ 1: "text-purple-600", 2: "text-blue-600", 3: "text-green-600" }[s]}` }) }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("div", { className: "font-semibold", children: a(`useCases.${s}.persona`) }),
            /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-secondary)]", children: a(`useCases.${s}.role`) })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "space-y-3 text-sm", children: [
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("span", { className: "font-medium text-[var(--text-secondary)]", children: [
              a("useCases.situationLabel"),
              " "
            ] }),
            /* @__PURE__ */ e("span", { children: a(`useCases.${s}.situation`) })
          ] }),
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("span", { className: "font-medium text-green-600", children: [
              a("useCases.withFeatureLabel"),
              " "
            ] }),
            /* @__PURE__ */ e("span", { children: a(`useCases.${s}.withFeature`) })
          ] })
        ] })
      ] }, `usecase-${s}`)) })
    ] }),
    /* @__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" }),
        a("sections.features")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-4", children: [1, 2, 3, 4, 5].map((s) => {
        const n = [p, u, c, d, i][s - 1];
        return /* @__PURE__ */ e("div", { className: "card p-6", children: /* @__PURE__ */ t("div", { className: "flex items-start gap-4", children: [
          /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(n, { className: "w-6 h-6 text-[var(--color-primary-600)]" }) }),
          /* @__PURE__ */ t("div", { className: "flex-1", children: [
            /* @__PURE__ */ e("h3", { className: "font-semibold mb-2", children: a(`features.${s}.title`) }),
            /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mb-3", children: a(`features.${s}.description`) }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)] text-sm", children: [
              /* @__PURE__ */ t("span", { className: "font-medium text-[var(--color-primary-600)]", children: [
                a("features.exampleLabel"),
                " "
              ] }),
              a(`features.${s}.example`)
            ] })
          ] })
        ] }) }, `feature-${s}`);
      }) })
    ] }),
    /* @__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" }),
        a("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-4", children: [1, 2, 3, 4, 5].map((s) => /* @__PURE__ */ t("div", { className: "card p-4", children: [
        /* @__PURE__ */ e("h3", { className: "font-medium mb-2", children: a(`faq.${s}.question`) }),
        /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: a(`faq.${s}.answer`) })
      ] }, `faq-${s}`)) })
    ] }),
    /* @__PURE__ */ e("section", { id: "reference", className: "scroll-mt-4", children: /* @__PURE__ */ t("details", { className: "card", children: [
      /* @__PURE__ */ t("summary", { className: "p-4 cursor-pointer hover:bg-[var(--bg-secondary)] rounded-lg font-semibold flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-8 h-8 rounded-full bg-gray-500/10 text-gray-600 flex items-center justify-center text-sm", children: "9" }),
        a("sections.technicalRef")
      ] }),
      /* @__PURE__ */ t("div", { className: "p-4 pt-0 space-y-6", children: [
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h3", { className: "font-semibold mb-3", children: a("techRef.businessRules") }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: ["BR-001", "BR-002", "BR-003", "BR-004", "BR-005", "BR-006", "BR-007"].map((s, l) => /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs font-mono text-[var(--color-primary-600)]", children: s }),
              /* @__PURE__ */ e("span", { className: "text-xs px-2 py-0.5 rounded bg-[var(--color-primary-600)]/10", children: ["Validation", "Validation", "Config", "Validation", "Validation", "Business Logic", "Business Logic"][l] })
            ] }),
            /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-1", children: a(`techRef.rules.${s}`) })
          ] }, s)) })
        ] }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h3", { className: "font-semibold mb-3", children: a("techRef.apiEndpoints") }),
          /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ t("table", { className: "w-full text-sm", children: [
            /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { className: "bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3", children: "Method" }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3", children: "Endpoint" }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3", children: "Handler" })
            ] }) }),
            /* @__PURE__ */ e("tbody", { children: T.map((s, l) => /* @__PURE__ */ t("tr", { className: "border-b border-[var(--border-color)]", children: [
              /* @__PURE__ */ e("td", { className: "py-2 px-3", children: /* @__PURE__ */ e("span", { className: `px-2 py-0.5 rounded text-xs font-medium ${s.method === "GET" ? "bg-blue-500/10 text-blue-600" : "bg-green-500/10 text-green-600"}`, children: s.method }) }),
              /* @__PURE__ */ e("td", { className: "py-2 px-3 font-mono text-xs", children: s.path }),
              /* @__PURE__ */ e("td", { className: "py-2 px-3 text-[var(--text-secondary)]", children: s.handler })
            ] }, `${s.method}-${s.path}-${l}`)) })
          ] }) })
        ] })
      ] })
    ] }) }),
    /* @__PURE__ */ t("div", { className: "flex justify-between pt-6 border-t border-[var(--border-color)]", children: [
      /* @__PURE__ */ t(
        m,
        {
          to: "/docs/business/administration/tenants",
          className: "flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]",
          children: [
            /* @__PURE__ */ e(x, { className: "w-4 h-4" }),
            a("nav.backToTenants")
          ]
        }
      ),
      /* @__PURE__ */ t(
        m,
        {
          to: "/docs/business/administration/tenants/applications",
          className: "flex items-center gap-2 text-[var(--color-primary-600)] hover:underline",
          children: [
            "Applications du Tenant",
            /* @__PURE__ */ e(x, { className: "w-4 h-4 rotate-180" })
          ]
        }
      )
    ] })
  ] });
}
export {
  I as default
};
//# sourceMappingURL=index-BEOtfRxa.js.map
