"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),l=require("react"),C=require("../../src/components/FAQComponent/faqComponent.module.css"),F=require("../FAQComponentItem/FAQComponentItem.cjs.js"),Q=({items:r,mode:o="multiple",initialActiveIndex:n})=>{const[u,m]=l.useState(n!=null?n:null),[p,a]=l.useState(new Set),S=e=>{o==="single"?m(t=>t===e?null:e):a(t=>{const s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},g=e=>o==="single"?u===e:p.has(e);return c.jsx("div",{className:C.root,children:r.map((e,t)=>c.jsx(F.FAQComponentItem,{title:e.title,content:e.content,isOpen:g(t),index:t,onClick:S},t))})};exports.FAQComponent=Q;
