const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vue3-toastify-DHXAGmwn.css","./admin-AcTQvlCT.css","./global-B0Vk3c1V.css","./vendor-vue3-html2pdf-DBfPfU4j.css","./vendor-vueform-slider-BwB83iY9.css","./settings-pgwxqM9u.css","./Checkbox-JxflRz5e.css","./Wrapper-BmE2SI8B.css","./TemplateList-DOKHAIEA.css","./ThemeToggle-mOEvE5WK.css","./TemplateSteps-CJqM4PhF.css","./Flow-BIshaNlr.css","./vendor-vue-flow-DhKgakta.css","./EmbedPopup-i3hyQMR8.css","./CalculatorRow-DnEK86cK.css","./CalculatorCard-Dz3LjwMH.css"])))=>i.map(i=>d[i]);
import{_ as r}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as C}from"./useFlowStore-CX_ohVaX.js";import{a as S}from"./admin-8MB3iCV_.js";import{d as v,e as w,$ as c,k as g,i as y,m as I,p as h,v as D}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as E,u as A}from"./vendor-vue-reactivity-CheHbvBM.js";const B=v({__name:"CalculatorItem",props:{type:{},calculator:{}},setup(s){const u=s,{calculator:n,type:l}=E(u),e=C(),o=S(),i=t=>{let a=[...e.getSelectedIds];e.getSelectedIds.includes(+t)?a=a.filter(f=>+f!=+t):a.push(+t),e.setSelectedIds(a)},p=async t=>{await o.deleteCalculators([t]),await e.fetchCalculators()},m=async t=>{await o.duplicateCalculators([t]),await e.fetchCalculators()},d=async t=>{await o.editCalculator(t)},_=w(()=>{if(l.value==="list")return c(()=>r(()=>import("./CalculatorRow-Bb6WJqzr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url));if(l.value==="grid")return c(()=>r(()=>import("./CalculatorCard-BGKgmvf5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,15]),import.meta.url))});return(t,a)=>(y(),g(D(_.value),{calculator:A(n),onToggleSelectCalculator:i,onDeleteCalculator:p,onDuplicateCalculator:m,onEditCalculator:d},{default:I(()=>[h(t.$slots,"default")]),_:3},40,["calculator"]))}});export{B as _};
//# sourceMappingURL=CalculatorItem.vue_vue_type_script_setup_true_lang-CjX0Zf8r.js.map
