import{T as N}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{a as S}from"./MobileTotalSummary.vue_vue_type_style_index_0_lang-CAUpXdiw.js";import{_ as B}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{d as q,a as x,e as r,n as F,f as u,i,x as d,j as m,t as v,m as A,F as I,r as T,k as w}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{r as E,t as G,u as M}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as V,a as f}from"./vendor-vue-shared-DrzsEcag.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./widget-RmM7xAIR.js";import"./appStore-CFAkQG2b.js";import"./vendor-pinia-BSPefQhS.js";import"./appearanceStore-Cp-euDX2.js";import"./settingsStore-8bwiLMEn.js";import"./fieldsStore-CNpVuoPu.js";import"./translationsStore-D6vLzgNA.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";import"./pageBreakerStore-Bkj6mcUr.js";import"./vendor-vueform-slider-CCH9_7pb.js";import"./index-D2j7l29-.js";import"./Wrapper.vue_vue_type_script_setup_true_lang-D49ddy6w.js";import"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-html2canvas-BfYXEYrK.js";import"./Button.vue_vue_type_style_index_0_lang-CxqKrtR4.js";import"./Popup.vue_vue_type_style_index_0_lang-uNTBWSeR.js";import"./ThankYouPage-CQHohb6N.js";const $=["data-accordion","data-group-id"],j={key:0,class:"ccb-group__icon"},z={key:1,class:"ccb-group__label"},D={class:"ccb-group__fields",ref:"fields"},be=q({__name:"Group",props:{field:{}},setup(_){x(()=>{p.value&&(l.value=!0,F(()=>{const a=document.querySelectorAll(".ccb-group");document.querySelectorAll(".ccb-group__body").forEach(o=>{o.classList.add("collapsed")}),a.forEach(o=>{o.classList.add("ccb-group-collapsed")});const e=a[0],c=e==null?void 0:e.dataset.groupId;if(c!==void 0&&Number(c)===s.value.id){e.classList.remove("ccb-group-collapsed");const o=e.querySelector(".ccb-group__body");o&&o.classList.remove("collapsed"),l.value=!1}}))});const g=_,{field:s}=G(g),l=E(!!s.value.collapse),b=r(()=>s.value.label?s.value.label:"Group"),y=r(()=>a=>Array.from(a.values())),L=r(()=>s.value.groupElements.flatMap(a=>y.value(a))),h=r(()=>s.value.showTitle),n=r(()=>s.value.collapsible),p=r(()=>s.value.accordion),C=()=>{n.value&&(p.value?document.querySelectorAll(".ccb-group").forEach(t=>{const e=t,c=e==null?void 0:e.dataset.groupId,o=e.querySelector(".ccb-group__body");c!==void 0&&Number(c)!==+s.value.id?(e.classList.add("ccb-group-collapsed"),o==null||o.classList.add("collapsed"),l.value=!0):e.classList.contains("ccb-group-collapsed")?(e.classList.remove("ccb-group-collapsed"),o==null||o.classList.remove("collapsed"),l.value=!1):(e.classList.add("ccb-group-collapsed"),o==null||o.classList.add("collapsed"),l.value=!0)}):l.value=!l.value)},k=r(()=>{var a;return((a=s.value)==null?void 0:a.additionalStyles)||""});return(a,t)=>(i(),u("div",{class:f(["ccb-group",{"ccb-group-collapsed":l.value,[k.value]:!0}]),"data-accordion":p.value,"data-group-id":M(s).id},[d("div",{class:"ccb-group__header",onClick:C},[n.value?(i(),u("div",j,t[0]||(t[0]=[d("i",{class:"ccb-icon-Path-3514"},null,-1)]))):v("",!0),h.value?(i(),u("div",z,V(b.value),1)):v("",!0),m(B)]),m(N,{name:"fade"},{default:A(()=>[d("div",{class:f(["ccb-group__body",{collapsed:l.value}])},[d("div",D,[(i(!0),u(I,null,T(L.value,e=>(i(),w(S,{key:e.alias,name:e.fieldName,field:e},null,8,["name","field"]))),128))],512)],2)]),_:1})],10,$))}});export{be as default};
//# sourceMappingURL=index-C3eR1NyZ.js.map
