"use client";
import { jsx as i, jsxs as o } from "react/jsx-runtime";
import { cn as l } from "../../utils/cn/cn.es.js";
import e from "../../components/ContentTabs/contentTabs.module.css";
import { IconBracket as d } from "../IconBracket/IconBracket.es.js";
import { Icon as p } from "../Icon/Icon.es.js";
import { Typography as t } from "../Typography/Typography.es.js";
function b({ tabs: m, activeTab: r, colorScheme: a, activeWithArrow: s, onTabClick: c }) {
  return /* @__PURE__ */ i("div", { className: l(e.root, e[a]), children: m.map((n) => /* @__PURE__ */ o("div", { className: e.tabWrap, children: [
    /* @__PURE__ */ o(
      "button",
      {
        className: l(e.tab, {
          [e.activeTab]: r.label === n.label
        }),
        onClick: () => c(n),
        children: [
          r.label === n.label && s && /* @__PURE__ */ i("div", { className: e.arrow, children: /* @__PURE__ */ i(d, { variant: "arrow", size: "md", colorScheme: a }) }),
          n.icon && /* @__PURE__ */ i(p, { name: n.icon, className: e.icon }),
          /* @__PURE__ */ i(t, { defaultVariant: "headingXxs", children: n.label })
        ]
      }
    ),
    /* @__PURE__ */ i(
      "div",
      {
        className: l(e.itemContent, { [e.itemContentOpen]: r.label === n.label }),
        children: /* @__PURE__ */ i("div", { className: e.itemContentInner, children: /* @__PURE__ */ i(t, { as: "div", defaultVariant: "bodySm", children: n.description }) })
      }
    )
  ] }, String(n.label))) });
}
export {
  b as ContentTabs
};
