import{_ as d,b as w}from"./settings.consts-C6F6lZ8o.js";import{T as r}from"./Toggle-CJkQhFp2.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{u as g}from"./EmbedPopup-BUj0yGgY.js";import{c as V}from"./field-settings.constants-BwuDQrPV.js";import{u as v}from"./useAutoSyncDraft-e28EpTsr.js";import{d as k,w as x,f as c,i as n,x as t,j as a,t as u}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{b as y,u as s}from"./vendor-vue-reactivity-CheHbvBM.js";import{_ as z}from"./vendor-vue3-html2pdf-KR020wX8.js";import"./admin-BM775jCq.js";import"./vendor-vue-runtime-dom-B2rky8vu.js";import"./vendor-vue-shared-DrzsEcag.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";/* empty css               */import"./useAppearanceStore-IzenP-G4.js";import"./vendor-vue-flow-CRbOssRZ.js";import"./CalculatorBuilder-itTCCi74.js";import"./Wrapper-DuPkIHyx.js";import"./ThemeToggle-a3yohy6x.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";const B={class:"ccb-fields-settings-container ccb-custom-scrollbar"},S={class:"ccb-fields-settings__content ccb-custom-scrollbar"},T={class:"ccb-fields-settings ccb-field-sidebar"},N={class:"ccb-field-sidebar__header"},U={class:"ccb-field-sidebar__body"},C={class:"ccb-field-sidebar__item"},G={class:"ccb-field-sidebar__row"},F={class:"ccb-field-sidebar__row"},A={key:0,class:"ccb-field-sidebar__row"},$={key:1,class:"ccb-field-sidebar__row",style:{"flex-direction":"column"}},D={class:"ccb-field-sidebar__row-description"},E={key:2,class:"ccb-field-sidebar__row flex-column",style:{"flex-direction":"column"}},M={class:"ccb-field-sidebar__row-description"},j=k({__name:"Group",props:{field:{}},setup(p){const m=p,b=g(),e=y({label:"",fieldName:"",description:"",width:100,collapsible:!0,collapse:!1,accordion:!1,showTitle:!0,hidden:!1}),f=()=>{const i=m.field;e.label=String(i.label||""),e.fieldName=String(i.fieldName||""),e.description=String(i.description||""),e.width=V(i.width),e.collapsible=!!(i.collapsible??!0),e.collapse=!!i.collapse,e.accordion=!!i.accordion,e.showTitle=!!(i.showTitle??!0),e.hidden=!!i.hidden},{suppressAutoSync:_,restoredVersion:h}=v(()=>m.field,e,{});return x(()=>[m.field.alias,h.value],()=>_(()=>f()),{immediate:!0}),(i,l)=>(n(),c("div",B,[t("div",S,[t("div",T,[t("div",{class:"ccb-fields-settings-back",onClick:l[0]||(l[0]=o=>s(b).setSelectedField(null))},[l[7]||(l[7]=t("i",{class:"ccb-icon-ic_back"},null,-1)),a(s(d),{text:"Back to Fields",size:"s",weight:"medium"})]),t("div",N,[a(s(d),{text:i.field.label,size:"m",weight:"bold",class:"ccb-field-sidebar__label"},null,8,["text"]),a(s(d),{text:i.field.alias,size:"m",weight:"medium",class:"ccb-field-sidebar__alias"},null,8,["text"])]),t("div",U,[t("div",C,[a(s(w),{label:"Element name",placeholder:"Group name",modelValue:e.label,"onUpdate:modelValue":l[1]||(l[1]=o=>e.label=o)},null,8,["modelValue"])]),t("div",G,[a(s(r),{label:"Show Name",size:"m",weight:"medium",modelValue:e.showTitle,"onUpdate:modelValue":l[2]||(l[2]=o=>e.showTitle=o)},null,8,["modelValue"])]),t("div",F,[a(s(r),{label:"Make this group collapsible",size:"m",weight:"medium",modelValue:e.collapsible,"onUpdate:modelValue":l[3]||(l[3]=o=>e.collapsible=o)},null,8,["modelValue"])]),e.collapsible?(n(),c("div",A,[a(s(r),{label:"Collapse this group by default",size:"m",weight:"medium",modelValue:e.collapse,"onUpdate:modelValue":l[4]||(l[4]=o=>e.collapse=o)},null,8,["modelValue"])])):u("",!0),e.collapsible?(n(),c("div",$,[a(s(r),{label:"Accordion Mode",size:"m",weight:"medium",modelValue:e.accordion,"onUpdate:modelValue":l[5]||(l[5]=o=>e.accordion=o)},null,8,["modelValue"]),t("div",D,[a(s(d),{text:"This makes that only one Group element is open at a time, and it is applied to all Group fields in the calculator.",size:"s",weight:"regular"})])])):u("",!0),e.collapsible?(n(),c("div",E,[a(s(r),{label:"Show this group based on condition",size:"m",weight:"medium",modelValue:e.hidden,"onUpdate:modelValue":l[6]||(l[6]=o=>e.hidden=o)},null,8,["modelValue"]),t("div",M,[a(s(d),{text:'This makes the group hidden by default. Open "Conditions" tab and create a condition with this field so users can reveal it.',size:"s",weight:"regular"})])])):u("",!0)])])])]))}}),ue=z(j,[["__scopeId","data-v-9fc583f8"]]);export{ue as default};
//# sourceMappingURL=Group-nSPdQexJ.js.map
