import { jsxs as r, jsx as e } from "react/jsx-runtime";
import { useState as d } from "react";
import { Link as $ } from "react-router-dom";
import { useTranslation as O } from "react-i18next";
import { ArrowLeft as E, UserPlus as u, ChevronRight as m, Check as P, Search as U, ChevronDown as L, CheckCircle as B, HelpCircle as G, Info as q } from "lucide-react";
const f = [
  { id: "1", name: "Acme Corporation", slug: "acme" },
  { id: "2", name: "TechVision Inc.", slug: "techvision" },
  { id: "3", name: "DataCorp Systems", slug: "datacorp" }
], D = [
  { id: "1", name: "Administration", slug: "administration" },
  { id: "2", name: "Support", slug: "support" }
], V = [
  { id: "1", name: "Administrator", appId: "1" },
  { id: "2", name: "Manager", appId: "1" },
  { id: "3", name: "Operator", appId: "1" },
  { id: "4", name: "Viewer", appId: "1" },
  { id: "5", name: "Support Agent", appId: "2" },
  { id: "6", name: "Support Manager", appId: "2" },
  { id: "7", name: "Support Viewer", appId: "2" },
  { id: "8", name: "Support Analyst", appId: "2" }
], H = [
  { id: "BR-001", key: "techRef.rules.br001" },
  { id: "BR-002", key: "techRef.rules.br002" },
  { id: "BR-003", key: "techRef.rules.br003" },
  { id: "BR-004", key: "techRef.rules.br004" }
], M = [
  { method: "POST", path: "/api/administration/users", handler: "CreateUser", permission: "administration.users.create" },
  { method: "GET", path: "/api/administration/tenants/available", handler: "GetAvailableTenants", permission: "administration.users.create" },
  { method: "GET", path: "/api/administration/roles/assignable", handler: "GetAssignableRoles", permission: "administration.users.create" },
  { method: "POST", path: "/api/administration/users/{id}/tenants", handler: "AssignUserTenants", permission: "administration.users.create" }
], F = {
  GET: "bg-[var(--info-bg)] text-[var(--info-text)] border-[var(--info-border)]",
  POST: "bg-[var(--success-bg)] text-[var(--success-text)] border-[var(--success-border)]",
  PUT: "bg-[var(--warning-bg)] text-[var(--warning-text)] border-[var(--warning-border)]",
  PATCH: "bg-[var(--warning-bg)] text-[var(--warning-text)] border-[var(--warning-border)]",
  DELETE: "bg-[var(--error-bg)] text-[var(--error-text)] border-[var(--error-border)]"
};
function i({ children: a }) {
  return /* @__PURE__ */ r("div", { className: "mt-3 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(q, { className: "h-3.5 w-3.5 flex-shrink-0 mt-0.5 text-[var(--color-accent-600)]" }),
    /* @__PURE__ */ e("span", { children: a })
  ] });
}
function Y() {
  const { t: a } = O("docsAdministrationUsersCreate"), [o, p] = d("profile"), [v, g] = d(""), [x, y] = d(["1"]), [N, w] = d("1"), [R, k] = d({ 1: !1 }), [T, z] = d({ 1: ["1", "2"] }), [h, C] = d(!1), A = f.filter(
    (t) => t.name.toLowerCase().includes(v.toLowerCase())
  ), j = (t) => {
    y(
      (s) => s.includes(t) ? s.filter((n) => n !== t) : [...s, t]
    );
  }, S = (t, s) => {
    z((n) => ({
      ...n,
      [t]: n[t]?.includes(s) ? n[t].filter((c) => c !== s) : [...n[t] ?? [], s]
    }));
  };
  return /* @__PURE__ */ r("div", { className: "space-y-8 max-w-5xl mx-auto px-4 py-6", children: [
    /* @__PURE__ */ r(
      $,
      {
        to: "/docs/business/administration/users",
        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(E, { className: "h-4 w-4" }),
          a("nav.backToUsers")
        ]
      }
    ),
    /* @__PURE__ */ r("div", { children: [
      /* @__PURE__ */ r("div", { className: "flex items-center gap-3 mb-3", children: [
        /* @__PURE__ */ e("div", { className: "p-2 rounded-lg bg-[var(--color-accent-600)]/10", children: /* @__PURE__ */ e(u, { className: "h-6 w-6 text-[var(--color-accent-600)]" }) }),
        /* @__PURE__ */ r("div", { className: "min-w-0", children: [
          /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-[var(--text-primary)]", children: a("title") }),
          /* @__PURE__ */ e("p", { className: "text-xl text-[var(--color-accent-600)] font-medium mt-1", children: a("summary") }),
          /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] mt-1", children: a("subtitle") })
        ] })
      ] }),
      /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-3 text-sm text-[var(--text-secondary)]", children: [
        /* @__PURE__ */ r("span", { children: [
          "3 ",
          a("header.steps")
        ] }),
        /* @__PURE__ */ e("span", { children: "·" }),
        /* @__PURE__ */ r("span", { children: [
          "4 ",
          a("header.apiEndpoints")
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "1" }),
        a("sections.objective")
      ] }),
      /* @__PURE__ */ e("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)] leading-relaxed", children: a("objective") }) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "2" }),
        a("sections.access")
      ] }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-lg p-4 bg-[var(--bg-card)] space-y-3", children: [
        /* @__PURE__ */ r("div", { children: [
          /* @__PURE__ */ e("div", { className: "text-xs font-medium text-[var(--text-secondary)] mb-2", children: a("access.navigation") }),
          /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
            /* @__PURE__ */ e("span", { className: "px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)] 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-[var(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)] 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(--bg-secondary)] text-[var(--text-secondary)] border border-[var(--border-color)] font-medium", children: "Users" }),
            /* @__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-accent-600)]/10 text-[var(--color-accent-700)] border border-[var(--color-accent-500)]/20 font-medium", children: a("access.module") })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-3 text-xs min-w-0", children: [
          /* @__PURE__ */ e("div", { className: "min-w-0 px-3 py-1.5 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] font-mono text-[var(--text-secondary)] break-all", children: a("access.url") }),
          /* @__PURE__ */ e("div", { className: "min-w-0 px-3 py-1.5 rounded-full bg-[var(--color-accent-600)]/10 border border-[var(--color-accent-500)]/20 text-[var(--color-accent-700)] font-mono break-all", children: a("access.permission") })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "3" }),
        a("sections.wizard")
      ] }),
      /* @__PURE__ */ r("div", { className: "mb-4 flex flex-wrap gap-2", children: [
        /* @__PURE__ */ e(
          "button",
          {
            onClick: () => p("profile"),
            className: `px-3 py-1.5 text-sm font-medium rounded-lg border ${o === "profile" ? "bg-[var(--color-accent-600)] text-white border-[var(--color-accent-600)]" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)] border-[var(--border-color)]"}`,
            children: a("wizard.steps.profile.label")
          }
        ),
        /* @__PURE__ */ e(
          "button",
          {
            onClick: () => p("tenants"),
            className: `px-3 py-1.5 text-sm font-medium rounded-lg border ${o === "tenants" ? "bg-[var(--color-accent-600)] text-white border-[var(--color-accent-600)]" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)] border-[var(--border-color)]"}`,
            children: a("wizard.steps.tenants.label")
          }
        ),
        /* @__PURE__ */ e(
          "button",
          {
            onClick: () => p("appsRoles"),
            className: `px-3 py-1.5 text-sm font-medium rounded-lg border ${o === "appsRoles" ? "bg-[var(--color-accent-600)] text-white border-[var(--color-accent-600)]" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)] border-[var(--border-color)]"}`,
            children: a("wizard.steps.appsRoles.label")
          }
        )
      ] }),
      /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden bg-[var(--bg-card)] shadow-sm", children: [
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--bg-secondary)]", children: [
          /* @__PURE__ */ r("h3", { className: "text-sm font-bold flex items-center gap-2 text-[var(--text-primary)]", children: [
            /* @__PURE__ */ e(u, { className: "h-4 w-4" }),
            a("wizard.pageTitle")
          ] }),
          /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mt-0.5", children: a("wizard.pageSubtitle") })
        ] }),
        /* @__PURE__ */ r("div", { className: "px-4 py-4 border-b border-[var(--border-color)] bg-[var(--bg-card)]", children: [
          /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: ["profile", "tenants", "appsRoles"].map((t, s) => /* @__PURE__ */ r("div", { className: "flex items-center flex-1", children: [
            /* @__PURE__ */ e(
              "div",
              {
                className: `w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold flex-shrink-0 ${o === t ? "bg-[var(--color-accent-600)] text-white" : ["profile", "tenants", "appsRoles"].indexOf(o) > s ? "bg-[var(--success-bg)] text-[var(--success-text)]" : "bg-[var(--bg-secondary)] text-[var(--text-secondary)]"}`,
                children: ["profile", "tenants", "appsRoles"].indexOf(o) > s ? /* @__PURE__ */ e(P, { className: "w-5 h-5" }) : s + 1
              }
            ),
            s < 2 && /* @__PURE__ */ e(
              "div",
              {
                className: `h-0.5 flex-1 mx-2 ${["profile", "tenants", "appsRoles"].indexOf(o) > s ? "bg-[var(--success-bg)]" : "bg-[var(--bg-secondary)]"}`
              }
            )
          ] }, t)) }),
          /* @__PURE__ */ r("div", { className: "flex items-center justify-between mt-3 text-xs", children: [
            /* @__PURE__ */ e(
              "span",
              {
                className: `font-medium ${o === "profile" ? "text-[var(--color-accent-600)]" : "text-[var(--text-secondary)]"}`,
                children: a("wizard.steps.profile.label")
              }
            ),
            /* @__PURE__ */ e(
              "span",
              {
                className: `font-medium ${o === "tenants" ? "text-[var(--color-accent-600)]" : "text-[var(--text-secondary)]"}`,
                children: a("wizard.steps.tenants.label")
              }
            ),
            /* @__PURE__ */ e(
              "span",
              {
                className: `font-medium ${o === "appsRoles" ? "text-[var(--color-accent-600)]" : "text-[var(--text-secondary)]"}`,
                children: a("wizard.steps.appsRoles.label")
              }
            )
          ] })
        ] }),
        /* @__PURE__ */ r("div", { className: "p-4 space-y-4", children: [
          o === "profile" && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
            /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("wizard.steps.profile.description") }),
            /* @__PURE__ */ r("div", { className: "space-y-3", children: [
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ r("label", { className: "block text-xs font-medium text-[var(--text-secondary)] mb-1", children: [
                  a("wizard.profile.firstName"),
                  " ",
                  /* @__PURE__ */ e("span", { className: "text-[var(--error-text)]", children: "*" })
                ] }),
                /* @__PURE__ */ e(
                  "input",
                  {
                    type: "text",
                    placeholder: a("wizard.profile.firstName"),
                    className: "w-full px-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
                  }
                ),
                /* @__PURE__ */ e(i, { children: a("wizard.profile.firstNameAnnotation") })
              ] }),
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ r("label", { className: "block text-xs font-medium text-[var(--text-secondary)] mb-1", children: [
                  a("wizard.profile.lastName"),
                  " ",
                  /* @__PURE__ */ e("span", { className: "text-[var(--error-text)]", children: "*" })
                ] }),
                /* @__PURE__ */ e(
                  "input",
                  {
                    type: "text",
                    placeholder: a("wizard.profile.lastName"),
                    className: "w-full px-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
                  }
                ),
                /* @__PURE__ */ e(i, { children: a("wizard.profile.lastNameAnnotation") })
              ] }),
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ r("label", { className: "block text-xs font-medium text-[var(--text-secondary)] mb-1", children: [
                  a("wizard.profile.email"),
                  " ",
                  /* @__PURE__ */ e("span", { className: "text-[var(--error-text)]", children: "*" })
                ] }),
                /* @__PURE__ */ e(
                  "input",
                  {
                    type: "email",
                    placeholder: "john.doe@example.com",
                    className: "w-full px-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
                  }
                ),
                /* @__PURE__ */ e(i, { children: a("wizard.profile.emailAnnotation") })
              ] }),
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ r("label", { className: "block text-xs font-medium text-[var(--text-secondary)] mb-1", children: [
                  a("wizard.profile.password"),
                  " ",
                  /* @__PURE__ */ e("span", { className: "text-[var(--error-text)]", children: "*" })
                ] }),
                /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
                  /* @__PURE__ */ e(
                    "input",
                    {
                      type: "password",
                      placeholder: "••••••••••••",
                      className: "flex-1 px-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
                    }
                  ),
                  /* @__PURE__ */ e("button", { className: "px-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] font-medium", children: a("wizard.profile.generateButton") })
                ] }),
                /* @__PURE__ */ e(i, { children: a("wizard.profile.passwordAnnotation") })
              ] })
            ] })
          ] }),
          o === "tenants" && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
            /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("wizard.steps.tenants.description") }),
            /* @__PURE__ */ r("div", { className: "space-y-3", children: [
              /* @__PURE__ */ r("div", { className: "relative", children: [
                /* @__PURE__ */ e(U, { className: "absolute left-3 top-2.5 w-4 h-4 text-[var(--text-muted)]" }),
                /* @__PURE__ */ e(
                  "input",
                  {
                    type: "text",
                    placeholder: a("wizard.tenants.searchPlaceholder"),
                    value: v,
                    onChange: (t) => g(t.target.value),
                    className: "w-full pl-9 pr-3 py-2 text-sm rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
                  }
                )
              ] }),
              /* @__PURE__ */ e("div", { className: "space-y-2", children: A.map((t) => /* @__PURE__ */ r("label", { className: "flex items-center gap-2 p-2 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] cursor-pointer hover:bg-[var(--bg-hover)]", children: [
                /* @__PURE__ */ e(
                  "input",
                  {
                    type: "checkbox",
                    checked: x.includes(t.id),
                    onChange: () => j(t.id),
                    className: "w-4 h-4 rounded border-[var(--border-color)]"
                  }
                ),
                /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[var(--text-primary)]", children: t.name })
              ] }, t.id)) }),
              /* @__PURE__ */ e(i, { children: a("wizard.tenants.listAnnotation") })
            ] })
          ] }),
          o === "appsRoles" && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
            /* @__PURE__ */ e("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: a("wizard.steps.appsRoles.description") }),
            x.length === 0 ? /* @__PURE__ */ e("div", { className: "text-sm text-[var(--text-secondary)]", children: a("wizard.appsRoles.noTenants") }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: x.map((t) => {
              const s = f.find((c) => c.id === t), n = N === t;
              return /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-lg overflow-hidden bg-[var(--bg-secondary)]", children: [
                /* @__PURE__ */ r(
                  "button",
                  {
                    onClick: () => w(n ? "" : t),
                    className: "w-full px-3 py-2 flex items-center justify-between text-sm font-medium text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",
                    children: [
                      /* @__PURE__ */ e("span", { children: s?.name }),
                      /* @__PURE__ */ e(
                        L,
                        {
                          className: `w-4 h-4 transition-transform ${n ? "rotate-180" : ""}`
                        }
                      )
                    ]
                  }
                ),
                n && /* @__PURE__ */ r("div", { className: "p-3 border-t border-[var(--border-color)] space-y-3 bg-[var(--bg-card)]", children: [
                  /* @__PURE__ */ r("label", { className: "flex items-center gap-2 text-sm cursor-pointer", children: [
                    /* @__PURE__ */ e(
                      "input",
                      {
                        type: "checkbox",
                        checked: R[t] ?? !1,
                        onChange: (c) => k((b) => ({ ...b, [t]: c.target.checked })),
                        className: "w-4 h-4 rounded border-[var(--border-color)]"
                      }
                    ),
                    /* @__PURE__ */ e("span", { className: "font-medium text-[var(--text-primary)]", children: a("wizard.appsRoles.isOwnerLabel") })
                  ] }),
                  D.map((c) => {
                    const b = V.filter((l) => l.appId === c.id);
                    return /* @__PURE__ */ r("div", { className: "border border-[var(--border-color)] rounded-lg p-2 bg-[var(--bg-primary)]", children: [
                      /* @__PURE__ */ e("div", { className: "text-xs font-bold text-[var(--text-secondary)] mb-2", children: c.name }),
                      /* @__PURE__ */ e("div", { className: "space-y-1", children: b.map((l) => /* @__PURE__ */ r("label", { className: "flex items-center gap-2 text-xs cursor-pointer", children: [
                        /* @__PURE__ */ e(
                          "input",
                          {
                            type: "checkbox",
                            checked: (T[t] ?? []).includes(l.id),
                            onChange: () => S(t, l.id),
                            className: "w-3 h-3 rounded border-[var(--border-color)]"
                          }
                        ),
                        /* @__PURE__ */ e("span", { className: "text-[var(--text-secondary)]", children: l.name })
                      ] }, l.id)) })
                    ] }, c.id);
                  }),
                  /* @__PURE__ */ e(i, { children: a("wizard.appsRoles.annotation") })
                ] })
              ] }, t);
            }) })
          ] })
        ] }),
        /* @__PURE__ */ r("div", { className: "px-4 py-3 border-t border-[var(--border-color)] bg-[var(--bg-secondary)] flex items-center justify-between gap-2", children: [
          /* @__PURE__ */ e("button", { className: "px-3 py-2 text-sm font-medium rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)]", children: a("wizard.footer.cancel") }),
          /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
            /* @__PURE__ */ e(
              "button",
              {
                disabled: o === "profile",
                className: "px-3 py-2 text-sm font-medium rounded-lg border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)] disabled:opacity-50",
                children: a("wizard.footer.back")
              }
            ),
            o !== "appsRoles" && /* @__PURE__ */ e("button", { className: "px-3 py-2 text-sm font-medium rounded-lg bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)]", children: a("wizard.footer.next") }),
            o === "appsRoles" && /* @__PURE__ */ r("button", { className: "px-3 py-2 text-sm font-medium rounded-lg bg-[var(--success-bg)] text-[var(--success-text)] hover:bg-[var(--success-bg)]/90 flex items-center gap-2", children: [
              /* @__PURE__ */ e(B, { className: "w-4 h-4" }),
              a("wizard.footer.submit")
            ] })
          ] })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "4" }),
        a("sections.useCases")
      ] }),
      /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: ["1", "2", "3"].map((t) => /* @__PURE__ */ r("div", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)]", children: [
        /* @__PURE__ */ e("h3", { className: "font-semibold text-sm text-[var(--text-primary)] mb-2", children: a(`useCases.${t}.persona`) }),
        /* @__PURE__ */ e("p", { className: "text-xs text-[var(--text-secondary)] mb-3", children: a(`useCases.${t}.situation`) }),
        /* @__PURE__ */ e("p", { className: "text-xs text-[var(--color-accent-600)] font-medium", children: a(`useCases.${t}.outcome`) })
      ] }, t)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "5" }),
        a("sections.faq")
      ] }),
      /* @__PURE__ */ e("div", { className: "space-y-3", children: ["1", "2", "3", "4"].map((t) => /* @__PURE__ */ r("details", { className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] cursor-pointer group", children: [
        /* @__PURE__ */ r("summary", { className: "flex items-center justify-between font-medium text-sm text-[var(--text-primary)] select-none", children: [
          /* @__PURE__ */ e("span", { children: a(`faq.${t}.question`) }),
          /* @__PURE__ */ e(G, { className: "w-4 h-4 text-[var(--text-muted)] group-open:hidden" }),
          /* @__PURE__ */ e(m, { className: "w-4 h-4 text-[var(--text-muted)] group-open:rotate-90 transition-transform hidden group-open:block" })
        ] }),
        /* @__PURE__ */ e("p", { className: "mt-3 text-sm text-[var(--text-secondary)] leading-relaxed", children: a(`faq.${t}.answer`) })
      ] }, t)) })
    ] }),
    /* @__PURE__ */ r("section", { children: [
      /* @__PURE__ */ r("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-accent-600)] text-white flex items-center justify-center text-xs font-bold", children: "6" }),
        a("sections.techRef")
      ] }),
      /* @__PURE__ */ r(
        "details",
        {
          open: h,
          onToggle: (t) => C(t.target.open),
          className: "p-4 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-[var(--radius-card)] cursor-pointer",
          children: [
            /* @__PURE__ */ r("summary", { className: "flex items-center justify-between font-medium text-sm text-[var(--text-primary)] select-none", children: [
              /* @__PURE__ */ e("span", { children: a("sections.techRef") }),
              /* @__PURE__ */ e(
                m,
                {
                  className: `w-4 h-4 text-[var(--text-muted)] transition-transform ${h ? "rotate-90" : ""}`
                }
              )
            ] }),
            /* @__PURE__ */ r("div", { className: "mt-4 space-y-6", children: [
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ e("h3", { className: "font-semibold text-sm text-[var(--text-primary)] mb-3", children: a("techRef.rulesTitle") }),
                /* @__PURE__ */ e("ul", { className: "space-y-2", children: H.map((t) => /* @__PURE__ */ r("li", { className: "text-xs text-[var(--text-secondary)] p-2 rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-color)]", children: [
                  /* @__PURE__ */ r("span", { className: "font-mono font-bold text-[var(--color-accent-600)]", children: [
                    t.id,
                    ":"
                  ] }),
                  " ",
                  a(t.key)
                ] }, t.id)) })
              ] }),
              /* @__PURE__ */ r("div", { children: [
                /* @__PURE__ */ e("h3", { className: "font-semibold text-sm text-[var(--text-primary)] mb-3", children: a("techRef.endpointsTitle") }),
                /* @__PURE__ */ e("div", { className: "space-y-2", children: M.map((t, s) => /* @__PURE__ */ r("div", { className: "p-3 rounded-lg border border-[var(--border-color)] bg-[var(--bg-secondary)] text-xs", children: [
                  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mb-1", children: [
                    /* @__PURE__ */ e("span", { className: `px-2 py-0.5 rounded font-bold text-xs ${F[t.method]}`, children: t.method }),
                    /* @__PURE__ */ e("span", { className: "font-mono text-[var(--text-secondary)] break-all min-w-0", children: t.path })
                  ] }),
                  /* @__PURE__ */ e("div", { className: "text-[var(--text-muted)]", children: t.handler }),
                  /* @__PURE__ */ r("div", { className: "mt-1 text-[var(--text-muted)]", children: [
                    /* @__PURE__ */ r("span", { className: "font-medium", children: [
                      a("techRef.permissionsTitle"),
                      ":"
                    ] }),
                    " ",
                    /* @__PURE__ */ e("span", { className: "font-mono", children: t.permission })
                  ] })
                ] }, s)) })
              ] })
            ] })
          ]
        }
      )
    ] })
  ] });
}
export {
  Y as default
};
//# sourceMappingURL=index-DCM7nrwz.js.map
