"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../../utils/cn/cn.cjs.js"),n=require("../../../../src/components/Accordion/components/AccordionItem/accordionItem.module.css"),u=require("../../../../utils/isHsIcon/isHsIcon.cjs.js"),c=require("../../../Icon/Icon.cjs.js"),r=require("../../../Typography/Typography.cjs.js"),p=require("../../../Icon/constants.cjs.js"),y=({title:a,content:i,isOpen:o,index:l,onClick:d,icon:t,isLast:m=!1})=>e.jsxs("div",{className:s.cn(n.itemRoot,{[n.itemRootLast]:m}),children:[e.jsxs("div",{className:n.itemHeader,onClick:()=>d(l),children:[u.isHsIcon(t)&&e.jsx("span",{className:n.leftIcon,children:e.jsx(c.Icon,{name:t})}),e.jsx(r.Typography,{defaultVariant:"bodyMd",children:a}),e.jsx("div",{className:n.closeButtonWrapper,children:e.jsx("span",{className:s.cn(n.arrow,o&&n.arrowRotated),children:e.jsx(c.Icon,{name:p.EIconName.CHEVRON_DOWN})})})]}),e.jsx("div",{className:s.cn(n.itemContent,{[n.itemContentOpen]:o}),children:e.jsx("div",{className:n.itemContentInner,children:e.jsx(r.Typography,{as:"p",defaultVariant:"bodyXs",mobileVariant:"bodyXs",children:i})})})]});exports.AccordionItem=y;
