"use client";
import { jsxs as n, jsx as o } from "react/jsx-runtime";
import { cn as r } from "../../../../utils/cn/cn.es.js";
import e from "../../../../components/Accordion/components/AccordionItem/accordionItem.module.css";
import { isHsIcon as f } from "../../../../utils/isHsIcon/isHsIcon.es.js";
import { Icon as i } from "../../../Icon/Icon.es.js";
import { Typography as m } from "../../../Typography/Typography.es.js";
import { EIconName as h } from "../../../Icon/constants.es.js";
const R = ({ title: s, content: c, isOpen: t, index: l, onClick: d, icon: a, isLast: p = !1 }) => /* @__PURE__ */ n("div", { className: r(e.itemRoot, { [e.itemRootLast]: p }), children: [
  /* @__PURE__ */ n("div", { className: e.itemHeader, onClick: () => d(l), children: [
    f(a) && /* @__PURE__ */ o("span", { className: e.leftIcon, children: /* @__PURE__ */ o(i, { name: a }) }),
    /* @__PURE__ */ o(m, { defaultVariant: "bodyMd", children: s }),
    /* @__PURE__ */ o("div", { className: e.closeButtonWrapper, children: /* @__PURE__ */ o("span", { className: r(e.arrow, t && e.arrowRotated), children: /* @__PURE__ */ o(i, { name: h.CHEVRON_DOWN }) }) })
  ] }),
  /* @__PURE__ */ o("div", { className: r(e.itemContent, { [e.itemContentOpen]: t }), children: /* @__PURE__ */ o("div", { className: e.itemContentInner, children: /* @__PURE__ */ o(m, { as: "p", defaultVariant: "bodyXs", mobileVariant: "bodyXs", children: c }) }) })
] });
export {
  R as AccordionItem
};
