"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),b=require("../../utils/cn/cn.cjs.js"),t=require("../../src/components/FeaturesList/featuresList.module.css"),y=require("../TypeBadge/TypeBadge.cjs.js"),o=require("../Typography/Typography.cjs.js"),a=require("../Superscript/Superscript.cjs.js"),m=require("../IconBracket/IconBracket.cjs.js"),S=({features:p})=>{const[i,u]=l.useState([]),d=l.useCallback(s=>{u(r=>r.includes(s)?r.filter(c=>c!==s):[...r,s])},[]);return e.jsx("div",{className:t.root,children:p.map((s,r)=>{const c=s.description&&s.collapsible,g=!!s.description,n=e.jsxs("div",{className:t.labelWrapper,children:[e.jsx(y.TypeBadge,{type:s.type},r),e.jsxs(o.Typography,{className:t.label,as:"span",defaultVariant:"bodyMd",mobileVariant:"labelLg",weight:"regular",children:[s.label,s.labelSuperscript&&!isNaN(s.labelSuperscript)&&e.jsx(a.Superscript,{value:s.labelSuperscript.toString()})]})]});return e.jsxs("div",{className:t.feature,children:[c?e.jsxs("button",{className:t.header,onClick:()=>d(r),children:[n,e.jsx(m.IconBracket,{variant:i.includes(r)?"close":"plus",size:"md"})]}):n,g&&e.jsxs(o.Typography,{as:"p",defaultVariant:"bodySm",className:b.cn(t.description,{[t.descriptionActive]:i.includes(r)||!c}),weight:"regular",children:[s.description,s.descriptionSuperscript&&!isNaN(s.descriptionSuperscript)&&e.jsx(a.Superscript,{value:s.descriptionSuperscript.toString()})]})]},`${s.label}-${r}`)})})};exports.FeaturesList=S;
