import { jsxs as r, jsx as e } from "react/jsx-runtime";
import { useState as y } from "react";
import { Link as m } from "react-router-dom";
import { useTranslation as w } from "react-i18next";
import { ChevronRight as x, Building2 as l, Star as d, Globe as p, Layers as k, Crown as u, Users as v, ArrowRight as h, UserCheck as i, HelpCircle as R, Code2 as b, ChevronDown as j, Info as g, ArrowLeft as C, Check as T } from "lucide-react";
const S = [
  {
    id: "1",
    name: "Acme Corporation",
    slug: "acme-corp",
    org: "Acme Group SA",
    status: "Active",
    isOwner: !0,
    isDefault: !0,
    membershipSource: "Direct"
  },
  {
    id: "2",
    name: "Fintech Solutions",
    slug: "fintech-solutions",
    org: "Fintech Holdings",
    status: "Active",
    isOwner: !1,
    isDefault: !1,
    membershipSource: "Group",
    groupPaths: ["RH > Consultants Externes"]
  },
  {
    id: "3",
    name: "Startup Lab",
    slug: "startup-lab",
    org: null,
    status: "Pending",
    isOwner: !1,
    isDefault: !1,
    membershipSource: "Direct"
  }
], A = {
  id: "4",
  name: "Global Services",
  slug: "global-services",
  org: "International Holdings",
  status: "Active",
  isOwner: !1,
  isDefault: !1,
  membershipSource: "Both",
  groupPaths: ["IT > Développeurs", "Projet > Alpha Team"]
}, D = [
  { method: "GET", path: "/api/personal/myspace/tenants", handler: "GetMyTenants", params: "?search=optional" },
  { method: "GET", path: "/api/personal/myspace/tenants/{id}/applications", handler: "GetTenantApplications", params: "" }
], B = [
  { id: "BR-001", category: "Validation", key: "techRef.rules.br001" },
  { id: "BR-002", category: "Sécurité", key: "techRef.rules.br002" },
  { id: "BR-003", category: "Logique", key: "techRef.rules.br003" },
  { id: "BR-004", category: "Feature", key: "techRef.rules.br004" },
  { id: "BR-005", category: "Sécurité", key: "techRef.rules.br005" },
  { id: "BR-006", category: "Validation", key: "techRef.rules.br006" },
  { id: "BR-007", category: "Réseau", key: "techRef.rules.br007" }
], $ = {
  Active: { bg: "var(--success-bg)", text: "var(--success-text)", dot: "var(--success-dot)" },
  Pending: { bg: "var(--info-bg)", text: "var(--info-text)", dot: "var(--info-dot)" },
  Suspended: { bg: "var(--warning-bg)", text: "var(--warning-text)", dot: "var(--warning-dot)" },
  Archived: { bg: "var(--error-bg)", text: "var(--error-text)", dot: "var(--error-dot)" }
}, E = {
  GET: "bg-[var(--info-bg)] text-[var(--info-text)] border border-[var(--info-border)]",
  POST: "bg-[var(--success-bg)] text-[var(--success-text)] border border-[var(--success-border)]",
  PUT: "bg-[var(--warning-bg)] text-[var(--warning-text)] border border-[var(--warning-border)]",
  DELETE: "bg-[var(--error-bg)] text-[var(--error-text)] border border-[var(--error-border)]"
};
function c({ children: t }) {
  return /* @__PURE__ */ r("div", { className: "flex items-start gap-2 px-3 py-2 rounded-md border-l-2 border-[var(--color-accent-500)] bg-[var(--bg-secondary)] text-xs text-[var(--text-secondary)]", children: [
    /* @__PURE__ */ e(g, { className: "w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-[var(--text-tertiary)]" }),
    /* @__PURE__ */ e("span", { className: "leading-relaxed", children: t })
  ] });
}
function f({ tenant: t, isSelected: s }) {
  const n = $[t.status];
  return /* @__PURE__ */ e(
    "div",
    {
      className: `bg-[var(--bg-card)] border overflow-hidden rounded-[var(--radius-card)] transition-all ${s ? "border-[var(--success-dot)] ring-2 ring-[var(--success-dot)]/20" : "border-[var(--border-color)]"} ${t.status !== "Active" ? "opacity-60" : ""}`,
      children: /* @__PURE__ */ r("div", { className: "p-5", children: [
        /* @__PURE__ */ r("div", { className: "flex items-start justify-between mb-4", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-3 min-w-0", children: [
            /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center bg-[var(--info-bg)]/30 flex-shrink-0", children: /* @__PURE__ */ e(l, { className: "w-6 h-6 text-[var(--info-dot)]" }) }),
            /* @__PURE__ */ r("div", { className: "min-w-0", children: [
              /* @__PURE__ */ e("h4", { className: "font-semibold text-[var(--text-primary)] text-sm truncate", children: t.name }),
              /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-tertiary)]", children: t.slug })
            ] })
          ] }),
          s && /* @__PURE__ */ e("div", { className: "w-6 h-6 rounded-full bg-[var(--success-dot)] flex items-center justify-center flex-shrink-0 ml-2", children: /* @__PURE__ */ e(T, { className: "w-4 h-4 text-white" }) })
        ] }),
        t.org && /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mb-3 truncate", children: t.org }),
        /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-wrap mb-4", children: [
          /* @__PURE__ */ r(
            "span",
            {
              className: "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full",
              style: { backgroundColor: n.bg, color: n.text },
              children: [
                /* @__PURE__ */ e("span", { className: "w-1.5 h-1.5 rounded-full", style: { backgroundColor: n.dot } }),
                t.status
              ]
            }
          ),
          t.isOwner && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--warning-bg)] text-[var(--warning-text)]", children: [
            /* @__PURE__ */ e(u, { className: "w-3 h-3" }),
            "Owner"
          ] }),
          t.isDefault && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-600)]", children: [
            /* @__PURE__ */ e(d, { className: "w-3 h-3 fill-current" }),
            "Default"
          ] })
        ] }),
        t.membershipSource === "Group" && /* @__PURE__ */ r("div", { className: "mb-4 p-2 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)]", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-1", children: [
            /* @__PURE__ */ e(v, { className: "w-3.5 h-3.5 text-[var(--info-dot)]" }),
            /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--text-secondary)]", children: "Via groupe" })
          ] }),
          t.groupPaths?.map((a) => /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1 text-xs text-[var(--text-tertiary)]", children: [
            /* @__PURE__ */ e(i, { className: "w-3 h-3 flex-shrink-0" }),
            /* @__PURE__ */ e("span", { className: "truncate", children: a })
          ] }, a))
        ] }),
        t.membershipSource === "Both" && /* @__PURE__ */ r("div", { className: "mb-4 p-2 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)]", children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-1", children: [
            /* @__PURE__ */ e(i, { className: "w-3.5 h-3.5 text-[var(--color-accent-500)]" }),
            /* @__PURE__ */ e("span", { className: "text-xs font-medium text-[var(--text-secondary)]", children: "Direct + Groupe" })
          ] }),
          t.groupPaths?.slice(0, 2).map((a) => /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1 text-xs text-[var(--text-tertiary)]", children: [
            /* @__PURE__ */ e(i, { className: "w-3 h-3 flex-shrink-0" }),
            /* @__PURE__ */ e("span", { className: "truncate", children: a })
          ] }, a))
        ] }),
        t.membershipSource === "Direct" && /* @__PURE__ */ r("div", { className: "mb-4 flex items-center gap-1.5 text-xs text-[var(--text-tertiary)]", children: [
          /* @__PURE__ */ e(i, { className: "w-3.5 h-3.5 text-[var(--success-dot)]" }),
          "Membre direct"
        ] }),
        t.status === "Active" && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-3 border-t border-[var(--border-color)]", children: [
          !t.isDefault && /* @__PURE__ */ e(
            "button",
            {
              className: "flex items-center justify-center p-2 text-[var(--text-secondary)] hover:text-[var(--warning-text)] rounded-[var(--radius-button)]",
              title: "Définir comme défaut",
              children: /* @__PURE__ */ e(d, { className: "w-4 h-4" })
            }
          ),
          /* @__PURE__ */ r("button", { className: "flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-[var(--color-accent-500)] rounded-[var(--radius-button)]", children: [
            "Entrer",
            /* @__PURE__ */ e(h, { className: "w-4 h-4" })
          ] })
        ] })
      ] })
    }
  );
}
function O() {
  const { t } = w("docsMyspaceTenants"), [s, n] = y(!1);
  return /* @__PURE__ */ r("div", { className: "space-y-8 max-w-5xl mx-auto pb-12", children: [
    /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm text-[var(--text-secondary)]", children: [
      /* @__PURE__ */ e(m, { to: "/docs/business/myspace/dashboard", className: "hover:text-[var(--color-accent-600)] transition-colors", children: t("nav.backToMySpace") }),
      /* @__PURE__ */ e(x, { className: "w-3.5 h-3.5 flex-shrink-0" }),
      /* @__PURE__ */ e("span", { className: "text-[var(--text-primary)] font-medium", children: t("title") })
    ] }),
    /* @__PURE__ */ r("div", { children: [
      /* @__PURE__ */ r("h1", { className: "text-3xl font-bold mb-2 flex items-center gap-3 text-[var(--text-primary)]", children: [
        /* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-xl flex items-center justify-center bg-[var(--color-accent-500)]/10 flex-shrink-0", children: /* @__PURE__ */ e(l, { className: "w-5 h-5 text-[var(--color-accent-500)]" }) }),
        t("title")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-xl text-[var(--color-accent-600)] font-medium", children: t("summary") }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mt-1", children: t("subtitle") }),
      /* @__PURE__ */ r("div", { className: "mt-3 flex items-center gap-4 flex-wrap text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ r("span", { children: [
          "7 ",
          t("header.businessRules")
        ] }),
        /* @__PURE__ */ r("span", { children: [
          "2 ",
          t("header.apiEndpoints")
        ] }),
        /* @__PURE__ */ r("span", { children: [
          "3 ",
          t("header.workspaceTypes")
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "1" }),
        t("sections.objectif")
      ] }),
      /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] leading-relaxed max-w-3xl", children: t("objectif") })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "2" }),
        t("sections.access")
      ] }),
      /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] space-y-3", children: [
        /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm flex-wrap", children: [
          /* @__PURE__ */ r("span", { className: "text-[var(--text-secondary)]", children: [
            t("access.navigation"),
            " :"
          ] }),
          /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-primary)] text-xs font-medium", children: t("access.appName") }),
          /* @__PURE__ */ e(x, { className: "w-3.5 h-3.5 text-[var(--text-tertiary)]" }),
          /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-primary)] text-xs font-medium", children: t("access.moduleName") }),
          /* @__PURE__ */ e(x, { className: "w-3.5 h-3.5 text-[var(--text-tertiary)]" }),
          /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--color-accent-500)]/10 text-[var(--color-accent-600)] text-xs font-medium", children: t("access.module") })
        ] }),
        /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-sm", children: [
          /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)]", children: "URL :" }),
          /* @__PURE__ */ e("code", { className: "px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-primary)] text-xs font-mono", children: t("access.route") })
        ] }),
        /* @__PURE__ */ r("div", { className: "flex items-start gap-2 text-sm", children: [
          /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)] flex-shrink-0", children: "Permission :" }),
          /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)]", children: t("access.permission") })
        ] }),
        /* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e(c, { children: t("access.note") }) })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "3" }),
        t("sections.overview")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: /* @__PURE__ */ r("div", { className: "p-4 space-y-4", children: [
        /* @__PURE__ */ r("div", { className: "flex items-center gap-3 pb-2 border-b border-[var(--border-color)]", children: [
          /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-lg bg-[var(--color-accent-500)]/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e(l, { className: "w-4 h-4 text-[var(--color-accent-500)]" }) }),
          /* @__PURE__ */ r("div", { children: [
            /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)]", children: t("overview.pageTitle") }),
            /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)]", children: t("overview.pageSubtitle") })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-3", children: [
            /* @__PURE__ */ e(d, { className: "w-4 h-4 text-[var(--warning-dot)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: t("overview.defaultSection") })
          ] }),
          /* @__PURE__ */ r("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-w-lg", children: [
            /* @__PURE__ */ e("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
              /* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-xl flex items-center justify-center bg-[var(--success-bg)]/30 flex-shrink-0", children: /* @__PURE__ */ e(p, { className: "w-5 h-5 text-[var(--success-dot)]" }) }),
              /* @__PURE__ */ r("div", { className: "min-w-0", children: [
                /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Global" }),
                /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: "Aucun espace spécifique" })
              ] })
            ] }) }),
            /* @__PURE__ */ e("div", { className: "p-4 bg-[var(--bg-card)] border-2 border-[var(--color-accent-500)] ring-2 ring-[var(--color-accent-500)]/20 rounded-[var(--radius-card)]", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
              /* @__PURE__ */ e("div", { className: "w-10 h-10 rounded-xl flex items-center justify-center bg-[var(--info-bg)]/30 flex-shrink-0", children: /* @__PURE__ */ e(l, { className: "w-5 h-5 text-[var(--info-dot)]" }) }),
              /* @__PURE__ */ r("div", { className: "min-w-0", children: [
                /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
                  /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)] truncate", children: "Acme Corp" }),
                  /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-1.5 py-0.5 text-xs rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-600)] flex-shrink-0", children: [
                    /* @__PURE__ */ e(d, { className: "w-2.5 h-2.5 fill-current" }),
                    "Défaut"
                  ] })
                ] }),
                /* @__PURE__ */ e("div", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: "Auto-connexion activée" })
              ] })
            ] }) })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-3", children: [
            /* @__PURE__ */ e(l, { className: "w-4 h-4 text-[var(--info-dot)]" }),
            /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-[var(--text-primary)]", children: t("overview.b2bSection") }),
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 text-xs font-medium rounded-full bg-[var(--info-bg)] text-[var(--info-text)]", children: t("overview.b2bBadge") })
          ] }),
          /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: S.map((a) => /* @__PURE__ */ e(f, { tenant: a, isSelected: a.id === "1" }, a.id)) })
        ] }),
        /* @__PURE__ */ r("div", { className: "space-y-1.5 mt-3", children: [
          /* @__PURE__ */ e(c, { children: t("overview.annotations.default") }),
          /* @__PURE__ */ e(c, { children: t("overview.annotations.grid") }),
          /* @__PURE__ */ e(c, { children: t("overview.annotations.defaultCard") }),
          /* @__PURE__ */ e(c, { children: t("overview.annotations.globalCard") })
        ] })
      ] }) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "4" }),
        t("sections.workspaceCard")
      ] }),
      /* @__PURE__ */ e("div", { className: "bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] overflow-hidden", children: /* @__PURE__ */ r("div", { className: "p-4 space-y-4", children: [
        /* @__PURE__ */ r("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 items-start", children: [
          /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(f, { tenant: A }) }),
          /* @__PURE__ */ e("div", { className: "space-y-2 text-xs", children: [
            { icon: /* @__PURE__ */ e(l, { className: "w-3 h-3" }), key: "icon", color: "text-[var(--info-dot)]" },
            { icon: /* @__PURE__ */ e(k, { className: "w-3 h-3" }), key: "name", color: "text-[var(--text-tertiary)]" },
            { icon: /* @__PURE__ */ e("div", { className: "w-3 h-3 rounded-full bg-[var(--success-dot)]" }), key: "status", color: "text-[var(--success-dot)]" },
            { icon: /* @__PURE__ */ e(u, { className: "w-3 h-3" }), key: "owner", color: "text-[var(--warning-text)]" },
            { icon: /* @__PURE__ */ e(d, { className: "w-3 h-3" }), key: "default", color: "text-[var(--color-accent-500)]" },
            { icon: /* @__PURE__ */ e(v, { className: "w-3 h-3" }), key: "membership", color: "text-[var(--info-dot)]" },
            { icon: /* @__PURE__ */ e(h, { className: "w-3 h-3" }), key: "actions", color: "text-[var(--color-accent-500)]" }
          ].map(({ icon: a, key: o, color: N }) => /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
            /* @__PURE__ */ e("div", { className: `mt-0.5 flex-shrink-0 ${N}`, children: a }),
            /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] leading-relaxed", children: t(`workspaceCard.annotations.${o}`) })
          ] }, o)) })
        ] }),
        /* @__PURE__ */ e("div", { className: "space-y-1.5 mt-2", children: /* @__PURE__ */ e(c, { children: t("workspaceCard.annotations.membership") }) })
      ] }) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "5" }),
        t("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-4", children: [
        { key: "uc1", icon: /* @__PURE__ */ e(v, { className: "w-5 h-5 text-[var(--color-accent-500)]" }) },
        { key: "uc2", icon: /* @__PURE__ */ e(p, { className: "w-5 h-5 text-[var(--info-dot)]" }) },
        { key: "uc3", icon: /* @__PURE__ */ e(i, { className: "w-5 h-5 text-[var(--success-dot)]" }) }
      ].map(({ key: a, icon: o }) => /* @__PURE__ */ e("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
        /* @__PURE__ */ e("div", { className: "w-9 h-9 rounded-lg bg-[var(--bg-secondary)] flex items-center justify-center flex-shrink-0", children: o }),
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)] mb-1", children: t(`useCases.${a}.persona`) }),
          /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mb-2", children: t(`useCases.${a}.scenario`) }),
          /* @__PURE__ */ e("div", { className: "p-2 rounded-md bg-[var(--bg-secondary)] text-xs text-[var(--text-tertiary)]", children: t(`useCases.${a}.steps`) })
        ] })
      ] }) }, a)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "6" }),
        t("sections.features")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: ["f1", "f2", "f3", "f4", "f5"].map((a) => /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)] mb-1", children: t(`features.${a}.title`) }),
        /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: t(`features.${a}.description`) })
      ] }, a)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("h2", { className: "text-lg font-semibold mb-4 text-[var(--text-primary)] flex items-center gap-2", children: [
        /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "7" }),
        t("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-3", children: ["q1", "q2", "q3", "q4", "q5"].map((a) => /* @__PURE__ */ e("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
        /* @__PURE__ */ e(R, { className: "w-4 h-4 text-[var(--color-accent-500)] flex-shrink-0 mt-0.5" }),
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-[var(--text-primary)] mb-1", children: t(`faq.${a}.question`) }),
          /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: t(`faq.${a}.answer`) })
        ] })
      ] }) }, a)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r(
        "button",
        {
          onClick: () => n((a) => !a),
          className: "w-full text-left flex items-center justify-between p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] hover:bg-[var(--bg-secondary)] transition-colors",
          "aria-expanded": s,
          children: [
            /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
              /* @__PURE__ */ e("span", { className: "w-6 h-6 rounded-full bg-[var(--color-accent-500)]/10 text-[var(--color-accent-500)] flex items-center justify-center text-xs font-bold flex-shrink-0", children: "8" }),
              /* @__PURE__ */ e("span", { className: "text-base font-semibold text-[var(--text-primary)]", children: t("sections.techRef") }),
              /* @__PURE__ */ e(b, { className: "w-4 h-4 text-[var(--text-tertiary)]" })
            ] }),
            /* @__PURE__ */ e(
              j,
              {
                className: `w-4 h-4 text-[var(--text-tertiary)] transition-transform duration-200 ${s ? "rotate-180" : ""}`
              }
            )
          ]
        }
      ),
      s && /* @__PURE__ */ r("div", { className: "mt-3 space-y-5", children: [
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ r("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(b, { className: "w-4 h-4 text-[var(--color-accent-500)]" }),
            t("techRef.apiTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { className: "w-full text-xs", children: [
            /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { className: "bg-[var(--bg-secondary)]", children: [
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3 font-semibold text-[var(--text-secondary)] rounded-tl-md", children: t("techRef.method") }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3 font-semibold text-[var(--text-secondary)]", children: t("techRef.endpoint") }),
              /* @__PURE__ */ e("th", { className: "text-left py-2 px-3 font-semibold text-[var(--text-secondary)] rounded-tr-md", children: t("techRef.handler") })
            ] }) }),
            /* @__PURE__ */ e("tbody", { children: D.map((a) => /* @__PURE__ */ r("tr", { className: "border-t border-[var(--border-color)]", children: [
              /* @__PURE__ */ e("td", { className: "py-2 px-3", children: /* @__PURE__ */ e("span", { className: `inline-flex items-center px-2 py-0.5 rounded text-xs font-mono font-semibold ${E[a.method]}`, children: a.method }) }),
              /* @__PURE__ */ r("td", { className: "py-2 px-3", children: [
                /* @__PURE__ */ e("code", { className: "text-xs font-mono text-[var(--text-primary)]", children: a.path }),
                a.params && /* @__PURE__ */ e("span", { className: "text-[var(--text-tertiary)] ml-1", children: a.params })
              ] }),
              /* @__PURE__ */ e("td", { className: "py-2 px-3 text-[var(--text-secondary)]", children: a.handler })
            ] }, a.path)) })
          ] }) })
        ] }),
        /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
          /* @__PURE__ */ r("h3", { className: "text-sm font-semibold text-[var(--text-primary)] mb-3 flex items-center gap-2", children: [
            /* @__PURE__ */ e(g, { className: "w-4 h-4 text-[var(--color-accent-500)]" }),
            t("techRef.rulesTitle")
          ] }),
          /* @__PURE__ */ e("div", { className: "space-y-2", children: B.map((a) => /* @__PURE__ */ r("div", { className: "flex items-start gap-3 text-xs", children: [
            /* @__PURE__ */ e("span", { className: "px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold bg-[var(--color-accent-500)]/10 text-[var(--color-accent-600)] flex-shrink-0 mt-0.5", children: a.id }),
            /* @__PURE__ */ e("span", { className: "px-1.5 py-0.5 rounded text-[10px] font-medium bg-[var(--bg-secondary)] text-[var(--text-tertiary)] flex-shrink-0 mt-0.5", children: a.category }),
            /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] leading-relaxed", children: t(a.key) })
          ] }, a.id)) })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-6 border-t border-[var(--border-color)]", children: [
      /* @__PURE__ */ r(
        m,
        {
          to: "/docs/business/myspace/dashboard",
          className: "flex items-center gap-2 text-sm text-[var(--text-secondary)] hover:text-[var(--color-accent-600)] transition-colors",
          children: [
            /* @__PURE__ */ e(C, { className: "w-4 h-4" }),
            t("nav.backToMySpace")
          ]
        }
      ),
      /* @__PURE__ */ r(
        m,
        {
          to: "/docs/business/myspace/preferences",
          className: "flex items-center gap-2 text-sm text-[var(--color-accent-600)] hover:underline",
          children: [
            t("nav.toPreferences"),
            /* @__PURE__ */ e(h, { className: "w-4 h-4" })
          ]
        }
      )
    ] })
  ] });
}
export {
  O as default
};
//# sourceMappingURL=index-DPGRj43A.js.map
