'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),s=require("@gem-sdk/core"),t=require("@gem-sdk/system"),l=require("../common/styles.js"),i=require("../hooks/useAccordion.js"),a=require("../common/classes.js");exports.default=({builderProps:n,builderAttrs:c,style:o,children:d,setting:u,styles:m,advanced:p})=>{let{align:y}=m??{},{childItem:j}=u??{},{ref:C,mode:f,accordions:g,handleDropdown:h,activeKey:q}=i.default({setting:u,children:d,builderProps:n}),x=t.createStyle({...l.getContainerStyles(o,m)}),S=t.createClass(a.getContainerClasses(p?.cssClass,f)),v=t.createAttr({...c,"data-id":n?.uid??""}),k=t.createStyle({...s.makeStyleResponsive("jc",y)}),A=t.createClass({"gp-flex":!0}),D=r.useMemo(()=>r.Children.map(d,(s,t)=>{if(!r.isValidElement(s))return s;let l={...s.props,index:t,title:j?.[t],accordions:g,handleDropDown:h,parentSetting:u,parentStyle:m,activeKey:q,childrenIcon:u?.childConfig?.[t],parentUid:n?.uid};return e.jsx("div",{className:A,style:k,children:r.cloneElement(s,l)})}),[g,q,n?.uid,j,d,A,k,h,u,m]);return e.jsx("div",{...v,ref:C,className:S,style:x,children:D})};
