import { jsxs as t, jsx as e } from "react/jsx-runtime";
import { useState as N } from "react";
import { Link as c } from "react-router-dom";
import { useTranslation as y } from "react-i18next";
import { ArrowLeft as o, Building2 as n, Target as w, Lightbulb as k, ChevronRight as m, Activity as b, Clock as h, RefreshCw as T, CheckCircle as C, PauseCircle as u, Users as R, Timer as A, TrendingUp as S, ClipboardList as j, ArrowRight as p, ShieldCheck as B, ShieldX as P, Search as $, Filter as E, MoreHorizontal as q, PlayCircle as g, Layers as L, Zap as G, HelpCircle as O, Code2 as D, Info as H, Archive as U } from "lucide-react";
const i = {
  total: 24,
  active: 18,
  suspended: 3,
  members: 142,
  avgSession: "4m 32s",
  growth: "+8.5%"
}, x = { pending: 5, approved: 128, denied: 12 }, V = [
  { name: "Acme Corporation", type: "Business", users: 24, accesses: 1842 },
  { name: "TechVision GmbH", type: "Business", users: 12, accesses: 973 },
  { name: "DataCorp France", type: "Business", users: 8, accesses: 641 },
  { name: "Alice Martin", type: "Personal", users: 1, accesses: 389 },
  { name: "InnoSuisse Sàrl", type: "Business", users: 5, accesses: 215 }
], I = [
  { name: "Acme Corporation", slug: "acme-corporation", type: "Business", status: "Active", members: 24 },
  { name: "TechVision GmbH", slug: "techvision-gmbh", type: "Business", status: "Active", members: 12 },
  { name: "Alice Martin", slug: "alice-martin", type: "Personal", status: "Active", members: 1 },
  { name: "InnoSuisse Sàrl", slug: "innosuisse-sarl", type: "Business", status: "Pending", members: 1 },
  { name: "DataCorp France", slug: "datacorp-france", type: "Business", status: "Suspended", members: 8 }
], F = {
  Active: { bg: "bg-green-500/10", text: "text-green-700", border: "border-green-500/20" },
  Pending: { bg: "bg-blue-500/10", text: "text-blue-700", border: "border-blue-500/20" },
  Suspended: { bg: "bg-amber-500/10", text: "text-amber-700", border: "border-amber-500/20" },
  Archived: { bg: "bg-gray-500/10", text: "text-gray-600", border: "border-gray-500/20" }
}, M = ({ status: r }) => r === "Active" ? /* @__PURE__ */ e(g, { className: "w-3 h-3" }) : r === "Suspended" ? /* @__PURE__ */ e(u, { className: "w-3 h-3" }) : r === "Archived" ? /* @__PURE__ */ e(U, { className: "w-3 h-3" }) : /* @__PURE__ */ e(h, { className: "w-3 h-3" }), v = ["#3b82f6", "#22c55e", "#f59e0b", "#ef4444", "#8b5cf6"], z = [
  { method: "GET", path: "/api/administration/tenants", handler: "GetAllTenants", permission: "administration.tenants.read" },
  { method: "GET", path: "/api/administration/tenants/analytics/dashboard", handler: "GetDashboardStats", permission: "administration.tenants.read" },
  { method: "GET", path: "/api/administration/tenants/analytics/top", handler: "GetTopTenants", permission: "administration.tenants.read" },
  { method: "GET", path: "/api/administration/tenants/{id}", handler: "GetTenant", permission: "administration.tenants.read" },
  { method: "POST", path: "/api/administration/tenants/b2c", handler: "CreateB2CTenant", permission: "administration.tenants.create" },
  { method: "POST", path: "/api/administration/tenants/b2b", handler: "CreateB2BTenant", permission: "administration.tenants.create" },
  { method: "PUT", path: "/api/administration/tenants/{id}", handler: "UpdateTenant", permission: "administration.tenants.update" },
  { method: "POST", path: "/api/administration/tenants/{id}/activate", handler: "ActivateTenant", permission: "administration.tenants.execute" },
  { method: "POST", path: "/api/administration/tenants/{id}/suspend", handler: "SuspendTenant", permission: "administration.tenants.execute" },
  { method: "DELETE", path: "/api/administration/tenants/{id}", handler: "ArchiveTenant", permission: "administration.tenants.delete" },
  { method: "POST", path: "/api/administration/tenants/{id}/template", handler: "AssignTemplate", permission: "administration.tenants.update" },
  { method: "POST", path: "/api/administration/tenants/{id}/organisation", handler: "LinkOrganisation", permission: "administration.tenants.update" }
], K = [
  { id: "BR-001", category: "Validation", key: "techRef.rules.br001" },
  { id: "BR-002", category: "Validation", key: "techRef.rules.br002" },
  { id: "BR-003", category: "Cycle de vie", key: "techRef.rules.br003" },
  { id: "BR-004", category: "Cycle de vie", key: "techRef.rules.br004" },
  { id: "BR-005", category: "Configuration", key: "techRef.rules.br005" },
  { id: "BR-006", category: "Organisation", key: "techRef.rules.br006" }
], X = {
  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-orange-500/10 text-orange-700 border-orange-500/20",
  DELETE: "bg-red-500/10 text-red-700 border-red-500/20"
};
function s({ children: r }) {
  return /* @__PURE__ */ t("div", { className: "mt-3 flex items-start gap-2 px-3 py-2 rounded-md bg-blue-50 border border-blue-200 text-xs text-blue-800 dark:bg-blue-950/30 dark:border-blue-800 dark:text-blue-300", children: [
    /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5 flex-shrink-0 mt-0.5" }),
    /* @__PURE__ */ e("span", { children: r })
  ] });
}
function _() {
  const { t: r } = y("docsAdministrationTenants"), [l, f] = N(!1);
  return /* @__PURE__ */ t("div", { className: "space-y-8 max-w-5xl mx-auto px-4 py-6", children: [
    /* @__PURE__ */ t(
      c,
      {
        to: "/docs/business/platform",
        className: "inline-flex items-center gap-1.5 text-sm text-[var(--color-accent-500)] hover:text-[var(--color-accent-600)] transition-colors",
        children: [
          /* @__PURE__ */ e(o, { className: "h-4 w-4" }),
          r("nav.backToAdmin")
        ]
      }
    ),
    /* @__PURE__ */ t("div", { children: [
      /* @__PURE__ */ t("div", { className: "flex items-center gap-3 mb-3", children: [
        /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-[var(--color-primary-600)]/10", children: /* @__PURE__ */ e(n, { className: "h-6 w-6 text-[var(--color-primary-600)]" }) }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-[var(--text-primary)]", children: r("title") }),
          /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mt-0.5", children: r("subtitle") })
        ] })
      ] }),
      /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-3 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ t("span", { children: [
          "9 ",
          r("header.businessRules")
        ] }),
        /* @__PURE__ */ e("span", { children: "·" }),
        /* @__PURE__ */ t("span", { children: [
          "29 ",
          r("header.apiEndpoints")
        ] }),
        /* @__PURE__ */ e("span", { children: "·" }),
        /* @__PURE__ */ t("span", { children: [
          "4 ",
          r("header.statuses")
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "1" }),
        r("sections.businessValue")
      ] }),
      /* @__PURE__ */ t("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
        /* @__PURE__ */ t("div", { className: "p-4 rounded-lg bg-red-50 border border-red-200 dark:bg-red-950/20 dark:border-red-800", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
            /* @__PURE__ */ e(w, { className: "h-4 w-4 text-red-600" }),
            /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-red-800 dark:text-red-300", children: r("value.problemTitle") })
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-red-700 dark:text-red-400", children: r("value.problem") })
        ] }),
        /* @__PURE__ */ t("div", { className: "p-4 rounded-lg bg-green-50 border border-green-200 dark:bg-green-950/20 dark:border-green-800", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-2", children: [
            /* @__PURE__ */ e(k, { className: "h-4 w-4 text-green-600" }),
            /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-green-800 dark:text-green-300", children: r("value.solutionTitle") })
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-green-700 dark:text-green-400", children: r("value.solution") })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "2" }),
        r("sections.access")
      ] }),
      /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-4 bg-[var(--bg-card)] space-y-3", children: [
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-secondary)] mb-2", children: r("access.navigation") }),
          /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-purple-500/10 text-purple-700 font-medium", children: "Platform" }),
            /* @__PURE__ */ e(m, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" }),
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-blue-500/10 text-blue-700 font-medium", children: "Administration" }),
            /* @__PURE__ */ e(m, { className: "h-3.5 w-3.5 text-[var(--text-muted)]" }),
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--color-primary-600)]/10 text-[var(--color-primary-700)] font-medium", children: r("access.module") })
          ] })
        ] }),
        /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-3 text-xs", children: [
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] font-mono text-[var(--text-secondary)]", children: "/administration/tenants/dashboard" }),
          /* @__PURE__ */ e("div", { className: "px-3 py-1.5 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-700 font-mono", children: "administration.tenants.read" })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "3" }),
        r("sections.dashboard")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mb-4", children: r("dashboard.desc") }),
      /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ t("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between", children: [
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ t("h3", { className: "text-sm font-bold flex items-center gap-2 text-[var(--text-primary)]", children: [
              /* @__PURE__ */ e(n, { className: "h-4 w-4" }),
              r("dashboard.pageTitle")
            ] }),
            /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: r("dashboard.pageSubtitle") })
          ] }),
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-0.5 p-0.5 border border-[var(--border-color)] bg-[var(--bg-primary)] rounded-lg", children: [
              /* @__PURE__ */ t("button", { className: "px-2.5 py-1 text-xs font-medium rounded-md bg-[var(--color-primary-600)] text-white flex items-center gap-1", children: [
                /* @__PURE__ */ e(b, { className: "w-3 h-3" }),
                r("dashboard.modeAccess")
              ] }),
              /* @__PURE__ */ t("button", { className: "px-2.5 py-1 text-xs font-medium rounded-md text-[var(--text-secondary)] flex items-center gap-1", children: [
                /* @__PURE__ */ e(h, { className: "w-3 h-3" }),
                r("dashboard.modeDuration")
              ] })
            ] }),
            /* @__PURE__ */ t("div", { className: "px-2.5 py-1 text-xs border border-[var(--border-color)] bg-[var(--bg-primary)] rounded-lg text-[var(--text-secondary)]", children: [
              "30 ",
              r("dashboard.days")
            ] }),
            /* @__PURE__ */ t("button", { className: "flex items-center gap-1 px-2.5 py-1 text-xs border border-[var(--border-color)] bg-[var(--bg-primary)] rounded-lg text-[var(--text-secondary)]", children: [
              /* @__PURE__ */ e(T, { className: "w-3 h-3" }),
              r("dashboard.refresh")
            ] })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3", children: [
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--info-bg)] border-[var(--info-border)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--info-text)] opacity-80", children: r("dashboard.kpi.total") }),
              /* @__PURE__ */ e(n, { className: "h-4 w-4 text-[var(--info-text)]" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--info-text)]", children: i.total })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--success-bg)] border-[var(--success-border)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--success-text)] opacity-80", children: r("dashboard.kpi.active") }),
              /* @__PURE__ */ e(C, { className: "h-4 w-4 text-[var(--success-text)]" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--success-text)]", children: i.active })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--warning-bg)] border-[var(--warning-border)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--warning-text)] opacity-80", children: r("dashboard.kpi.suspended") }),
              /* @__PURE__ */ e(u, { className: "h-4 w-4 text-[var(--warning-text)]" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--warning-text)]", children: i.suspended })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--bg-secondary)] border-[var(--border-color)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--text-secondary)]", children: r("dashboard.kpi.members") }),
              /* @__PURE__ */ e(R, { className: "h-4 w-4 text-purple-500" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--text-primary)]", children: i.members })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--info-bg)] border-[var(--info-border)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--info-text)] opacity-80", children: r("dashboard.kpi.avgSession") }),
              /* @__PURE__ */ e(A, { className: "h-4 w-4 text-[var(--info-text)]" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--info-text)]", children: i.avgSession }),
            /* @__PURE__ */ t("div", { className: "text-xs text-[var(--info-text)] opacity-60 mt-0.5", children: [
              "30 ",
              r("dashboard.days")
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "p-3 rounded-lg border bg-[var(--success-bg)] border-[var(--success-border)]", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
              /* @__PURE__ */ e("span", { className: "text-xs text-[var(--success-text)] opacity-80", children: r("dashboard.kpi.growth") }),
              /* @__PURE__ */ e(S, { className: "h-4 w-4 text-[var(--success-text)]" })
            ] }),
            /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--success-text)]", children: i.growth }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--success-text)] opacity-60 mt-0.5", children: r("dashboard.vsPrev") })
          ] })
        ] }) }),
        /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-3 bg-[var(--bg-secondary)]", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-3", children: [
            /* @__PURE__ */ t("h4", { className: "text-sm font-semibold flex items-center gap-2 text-[var(--text-primary)]", children: [
              /* @__PURE__ */ e(j, { className: "h-4 w-4 text-[var(--color-primary-600)]" }),
              r("dashboard.accessRequests.title")
            ] }),
            /* @__PURE__ */ t("button", { className: "text-xs text-[var(--color-primary-600)] hover:underline flex items-center gap-1", children: [
              r("dashboard.accessRequests.manage"),
              /* @__PURE__ */ e(p, { className: "h-3 w-3" })
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-3", children: [
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--warning-bg)] border border-[var(--warning-border)]", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
                /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--warning-text)]", children: r("dashboard.accessRequests.pending") }),
                /* @__PURE__ */ e(h, { className: "h-3.5 w-3.5 text-[var(--warning-text)]" })
              ] }),
              /* @__PURE__ */ e("div", { className: "text-xl font-bold text-[var(--warning-text)]", children: x.pending })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--success-bg)] border border-[var(--success-border)]", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
                /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--success-text)]", children: r("dashboard.accessRequests.approved") }),
                /* @__PURE__ */ e(B, { className: "h-3.5 w-3.5 text-[var(--success-text)]" })
              ] }),
              /* @__PURE__ */ e("div", { className: "text-xl font-bold text-[var(--success-text)]", children: x.approved })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--error-bg)] border border-[var(--error-border)]", children: [
              /* @__PURE__ */ t("div", { className: "flex items-center justify-between mb-1", children: [
                /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--error-text)]", children: r("dashboard.accessRequests.denied") }),
                /* @__PURE__ */ e(P, { className: "h-3.5 w-3.5 text-[var(--error-text)]" })
              ] }),
              /* @__PURE__ */ e("div", { className: "text-xl font-bold text-[var(--error-text)]", children: x.denied })
            ] })
          ] })
        ] }) }),
        /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-3", children: [
          /* @__PURE__ */ t("h4", { className: "text-sm font-semibold mb-3 flex items-center gap-2 text-[var(--text-primary)]", children: [
            /* @__PURE__ */ e(b, { className: "h-4 w-4 text-green-600" }),
            r("dashboard.topTenants.title")
          ] }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: V.map((a, d) => /* @__PURE__ */ t("div", { className: "flex items-center gap-3 p-2.5 rounded-lg bg-[var(--bg-secondary)] hover:bg-[var(--bg-hover)] transition-colors cursor-pointer", children: [
            /* @__PURE__ */ e(
              "div",
              {
                className: "w-7 h-7 rounded-full flex items-center justify-center text-white font-bold text-xs flex-shrink-0",
                style: { backgroundColor: v[d % v.length] },
                children: d + 1
              }
            ),
            /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
              /* @__PURE__ */ e("p", { className: "text-sm font-medium text-[var(--text-primary)] truncate", children: a.name }),
              /* @__PURE__ */ t("p", { className: "text-xs text-[var(--text-tertiary)]", children: [
                a.type,
                " · ",
                a.users,
                " ",
                r("dashboard.topTenants.users")
              ] })
            ] }),
            /* @__PURE__ */ t("div", { className: "text-right", children: [
              /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a.accesses.toLocaleString() }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-tertiary)]", children: r("dashboard.topTenants.accesses") })
            ] })
          ] }, a.name)) })
        ] }) }),
        /* @__PURE__ */ e("div", { className: "mx-4 mb-4 p-4 rounded-lg bg-gradient-to-r from-[var(--color-primary-600)]/10 to-[var(--color-accent-500)]/10 border border-[var(--border-color)]", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
          /* @__PURE__ */ t("div", { children: [
            /* @__PURE__ */ e("p", { className: "text-sm font-bold text-[var(--text-primary)]", children: r("dashboard.cta.title") }),
            /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: r("dashboard.cta.desc") })
          ] }),
          /* @__PURE__ */ e("button", { className: "px-3 py-1.5 rounded-lg bg-[var(--color-primary-600)] text-white text-xs font-medium whitespace-nowrap", children: r("dashboard.cta.button") })
        ] }) })
      ] }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.header") }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.modeToggle") }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.kpis") }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.accessRequests") }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.topTenants") }),
      /* @__PURE__ */ e(s, { children: r("dashboard.annotations.charts") })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "4" }),
        r("sections.list")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mb-4", children: r("list.desc") }),
      /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ t("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between", children: [
          /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-[var(--text-primary)]", children: r("list.pageTitle") }),
          /* @__PURE__ */ t("button", { className: "px-3 py-1.5 rounded-lg bg-[var(--color-primary-600)] text-white text-xs font-medium flex items-center gap-1.5 opacity-80", children: [
            /* @__PURE__ */ e(n, { className: "w-3.5 h-3.5" }),
            r("list.createButton")
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "p-3 border-b border-[var(--border-color)]", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2 flex-1 px-3 py-1.5 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-lg", children: [
            /* @__PURE__ */ e($, { className: "w-4 h-4 text-[var(--text-tertiary)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm text-[var(--text-tertiary)]", children: r("list.search") })
          ] }),
          /* @__PURE__ */ t("button", { className: "flex items-center gap-1.5 px-3 py-1.5 border border-[var(--border-color)] rounded-lg text-sm text-[var(--text-secondary)] bg-[var(--bg-secondary)]", children: [
            /* @__PURE__ */ e(E, { className: "w-3.5 h-3.5" }),
            r("list.filters")
          ] })
        ] }) }),
        /* @__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: r("list.columns.name") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("list.columns.type") }),
            /* @__PURE__ */ e("th", { className: "text-left px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider", children: r("list.columns.status") }),
            /* @__PURE__ */ e("th", { className: "text-center px-4 py-3 text-xs font-semibold text-[var(--text-tertiary)] uppercase tracking-wider hidden md:table-cell", children: r("list.columns.members") }),
            /* @__PURE__ */ e("th", { className: "w-12 px-4 py-3" })
          ] }) }),
          /* @__PURE__ */ e("tbody", { className: "divide-y divide-[var(--border-color)]", children: I.map((a) => {
            const d = F[a.status];
            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-3", children: [
                /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-lg bg-[var(--bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(n, { className: "w-4 h-4 text-[var(--text-secondary)]" }) }),
                /* @__PURE__ */ t("div", { children: [
                  /* @__PURE__ */ e("div", { className: "font-medium text-[var(--text-primary)]", children: a.name }),
                  /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-tertiary)] font-mono", children: a.slug })
                ] })
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e("span", { className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${a.type === "Business" ? "bg-blue-500/10 text-blue-700" : "bg-purple-500/10 text-purple-700"}`, children: a.type }) }),
              /* @__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 ${d.bg} ${d.text} ${d.border}`, children: [
                /* @__PURE__ */ e(M, { status: a.status }),
                r(`list.status.${a.status.toLowerCase()}`)
              ] }) }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 text-center hidden md:table-cell text-[var(--text-primary)]", children: a.members }),
              /* @__PURE__ */ e("td", { className: "px-4 py-3 text-center", children: /* @__PURE__ */ e("button", { className: "p-1.5 rounded-lg hover:bg-[var(--bg-tertiary)]", children: /* @__PURE__ */ e(q, { className: "w-4 h-4 text-[var(--text-tertiary)]" }) }) })
            ] }, a.slug);
          }) })
        ] }) })
      ] }),
      /* @__PURE__ */ e(s, { children: r("list.annotations.header") }),
      /* @__PURE__ */ e(s, { children: r("list.annotations.search") }),
      /* @__PURE__ */ e(s, { children: r("list.annotations.typeCol") }),
      /* @__PURE__ */ e(s, { children: r("list.annotations.statusCol") }),
      /* @__PURE__ */ e(s, { children: r("list.annotations.actions") })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "5" }),
        r("sections.detail")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mb-4", children: r("detail.desc") }),
      /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ t("div", { className: "px-4 py-3 border-b border-[var(--border-color)] flex items-center justify-between", children: [
          /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
            /* @__PURE__ */ e(o, { className: "w-4 h-4 text-[var(--text-secondary)]" }),
            /* @__PURE__ */ e(n, { className: "w-5 h-5 text-[var(--color-primary-600)]" }),
            /* @__PURE__ */ t("div", { children: [
              /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Acme Corporation" }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)]", children: "acme-corporation" })
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
            /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs bg-green-500/10 text-green-700 border border-green-500/20", children: [
              /* @__PURE__ */ e(g, { className: "w-3 h-3" }),
              r("detail.statusActive")
            ] }),
            /* @__PURE__ */ e("span", { className: "px-2.5 py-1 rounded-full text-xs bg-blue-500/10 text-blue-700", children: "Business" })
          ] })
        ] }),
        /* @__PURE__ */ e("div", { className: "border-b border-[var(--border-color)] flex overflow-x-auto", children: ["overview", "members", "groups", "roles", "applications", "entra", "requests"].map((a, d) => /* @__PURE__ */ e(
          "button",
          {
            className: `px-4 py-3 text-xs font-medium border-b-2 whitespace-nowrap ${d === 0 ? "border-[var(--color-primary-600)] text-[var(--color-primary-600)]" : "border-transparent text-[var(--text-secondary)]"}`,
            children: r(`detail.tabs.${a}`)
          },
          a
        )) }),
        /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
          /* @__PURE__ */ t("div", { className: "space-y-3", children: [
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mb-1", children: r("detail.overview.organisation") }),
              /* @__PURE__ */ e("div", { className: "font-medium text-sm text-[var(--text-primary)]", children: "Acme Corp SA" }),
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-tertiary)]", children: "CHE-123.456.789 · Route de la Paix 42, 1000 Lausanne" })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mb-1", children: r("detail.overview.template") }),
              /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
                /* @__PURE__ */ e(L, { className: "w-4 h-4 text-[var(--color-primary-600)]" }),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: "pro-space" })
              ] })
            ] })
          ] }),
          /* @__PURE__ */ t("div", { className: "space-y-3", children: [
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mb-1", children: r("detail.overview.members") }),
              /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-[var(--color-primary-600)]", children: "24" })
            ] }),
            /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mb-1", children: r("detail.overview.activeSince") }),
              /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-primary)]", children: "2024-03-15" })
            ] })
          ] })
        ] }) })
      ] }),
      /* @__PURE__ */ e(s, { children: r("detail.annotations.header") }),
      /* @__PURE__ */ e(s, { children: r("detail.annotations.status") }),
      /* @__PURE__ */ e(s, { children: r("detail.annotations.tabs") }),
      /* @__PURE__ */ e(s, { children: r("detail.annotations.overview") })
    ] }),
    /* @__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: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "6" }),
        r("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((a) => /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-4 bg-[var(--bg-card)]", children: [
        /* @__PURE__ */ e("div", { className: "text-xs font-semibold text-[var(--color-primary-600)] uppercase tracking-wide mb-1", children: r(`useCases.${a}.persona`) }),
        /* @__PURE__ */ e("p", { className: "text-sm font-medium mb-2", children: r(`useCases.${a}.situation`) }),
        /* @__PURE__ */ e("div", { className: "pt-2 border-t border-[var(--border-color)]", children: /* @__PURE__ */ t("p", { className: "text-xs text-[var(--text-muted)]", children: [
          /* @__PURE__ */ t("span", { className: "font-medium text-green-600", children: [
            r("useCases.withLabel"),
            " "
          ] }),
          r(`useCases.${a}.outcome`)
        ] }) })
      ] }, a)) })
    ] }),
    /* @__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: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "7" }),
        r("sections.features")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3, 4, 5].map((a) => /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-4 bg-[var(--bg-card)] flex gap-4", children: [
        /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-[var(--color-primary-600)]/10 flex-shrink-0 h-fit", children: /* @__PURE__ */ e(G, { className: "h-4 w-4 text-[var(--color-primary-600)]" }) }),
        /* @__PURE__ */ t("div", { children: [
          /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-1", children: r(`features.${a}.title`) }),
          /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-muted)] mb-2", children: r(`features.${a}.desc`) }),
          /* @__PURE__ */ t("div", { className: "px-3 py-1.5 rounded-md bg-[var(--bg-secondary)] text-xs", children: [
            /* @__PURE__ */ e("span", { className: "font-medium text-[var(--color-primary-600)]", children: "Ex. " }),
            r(`features.${a}.example`)
          ] })
        ] })
      ] }, a)) })
    ] }),
    /* @__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: "w-7 h-7 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-xs font-bold", children: "8" }),
        r("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3, 4, 5].map((a) => /* @__PURE__ */ t("div", { className: "border border-[var(--border-color)] rounded-lg p-4 bg-[var(--bg-card)]", children: [
        /* @__PURE__ */ t("div", { className: "flex items-start gap-2 mb-2", children: [
          /* @__PURE__ */ e(O, { className: "h-4 w-4 text-[var(--color-primary-600)] flex-shrink-0 mt-0.5" }),
          /* @__PURE__ */ e("h3", { className: "text-sm font-medium", children: r(`faq.${a}.question`) })
        ] }),
        /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-muted)] pl-6", children: r(`faq.${a}.answer`) })
      ] }, a)) })
    ] }),
    /* @__PURE__ */ t("section", { children: [
      /* @__PURE__ */ t(
        "button",
        {
          onClick: () => f(!l),
          className: "w-full flex items-center justify-between p-4 rounded-lg border border-[var(--border-color)] bg-[var(--bg-card)] hover:bg-[var(--bg-secondary)] transition-colors",
          children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e(D, { className: "h-4 w-4 text-[var(--text-muted)]" }),
              /* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: r("sections.techRef") })
            ] }),
            /* @__PURE__ */ e(m, { className: `h-4 w-4 text-[var(--text-muted)] transition-transform ${l ? "rotate-90" : ""}` })
          ]
        }
      ),
      l && /* @__PURE__ */ t("div", { className: "mt-2 border border-[var(--border-color)] rounded-lg bg-[var(--bg-card)] divide-y divide-[var(--border-color)]", children: [
        /* @__PURE__ */ t("div", { className: "p-4", children: [
          /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: r("techRef.rulesTitle") }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: K.map((a) => /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-[var(--bg-secondary)] text-xs", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-1", children: [
              /* @__PURE__ */ e("span", { className: "font-mono text-[var(--color-primary-600)]", children: a.id }),
              /* @__PURE__ */ e("span", { className: "px-1.5 py-0.5 rounded bg-[var(--color-primary-600)]/10 text-[var(--color-primary-700)]", children: a.category })
            ] }),
            /* @__PURE__ */ e("p", { className: "text-[var(--text-muted)]", children: r(a.key) })
          ] }, a.id)) })
        ] }),
        /* @__PURE__ */ t("div", { className: "p-4", children: [
          /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: r("techRef.permissionsTitle") }),
          /* @__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 px-2 text-[var(--text-muted)] font-medium", children: "Permission" }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-2 text-[var(--text-muted)] font-medium", children: "Description" })
            ] }) }),
            /* @__PURE__ */ e("tbody", { children: [
              { perm: "administration.tenants.read", key: "techRef.perms.read" },
              { perm: "administration.tenants.create", key: "techRef.perms.create" },
              { perm: "administration.tenants.update", key: "techRef.perms.update" },
              { perm: "administration.tenants.delete", key: "techRef.perms.delete" },
              { perm: "administration.tenants.execute", key: "techRef.perms.execute" },
              { perm: "administration.tenants.assign", key: "techRef.perms.assign" }
            ].map((a) => /* @__PURE__ */ t("tr", { className: "border-b border-[var(--border-color)]", children: [
              /* @__PURE__ */ e("td", { className: "py-2 px-2 font-mono text-[var(--color-primary-600)]", children: a.perm }),
              /* @__PURE__ */ e("td", { className: "py-2 px-2 text-[var(--text-muted)]", children: r(a.key) })
            ] }, a.perm)) })
          ] }) })
        ] }),
        /* @__PURE__ */ t("div", { className: "p-4", children: [
          /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: r("techRef.endpointsTitle") }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((a, d) => /* @__PURE__ */ t("div", { className: "p-2.5 rounded-lg bg-[var(--bg-secondary)] text-xs", children: [
            /* @__PURE__ */ t("div", { className: "flex items-center gap-2 mb-0.5", children: [
              /* @__PURE__ */ e("span", { className: `font-bold px-1.5 py-0.5 rounded border text-xs ${X[a.method]}`, children: a.method }),
              /* @__PURE__ */ e("code", { className: "text-[var(--text-primary)]", children: a.path })
            ] }),
            /* @__PURE__ */ t("div", { className: "text-[var(--text-muted)] pl-1", children: [
              a.handler,
              " · ",
              /* @__PURE__ */ e("span", { className: "font-mono", children: a.permission })
            ] })
          ] }, d)) })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t("div", { className: "flex justify-between pt-6 border-t border-[var(--border-color)]", children: [
      /* @__PURE__ */ t(
        c,
        {
          to: "/docs/business/platform",
          className: "flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)] transition-colors text-sm",
          children: [
            /* @__PURE__ */ e(o, { className: "w-4 h-4" }),
            r("nav.backToAdmin")
          ]
        }
      ),
      /* @__PURE__ */ t(
        c,
        {
          to: "/docs/business/platform/administration/tenants/business",
          className: "flex items-center gap-2 text-[var(--color-primary-600)] hover:underline text-sm",
          children: [
            r("nav.toTenantsBusiness"),
            /* @__PURE__ */ e(p, { className: "w-4 h-4" })
          ]
        }
      )
    ] })
  ] });
}
export {
  _ as default
};
//# sourceMappingURL=index-Blfc9wKG.js.map
