import{T as E,w as p}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{_ as D}from"./settings.consts-C6F6lZ8o.js";import{C as V}from"./Checkbox-DE_SYVDW.js";import{S as B}from"./Flow-TwOunta8.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{E as P}from"./EmbedPopup-BUj0yGgY.js";import{u as y}from"./useFlowStore-BY5s8sLu.js";import{d as N,e as $,f as z,i as s,x as o,k as _,t as v,j as n,m as I}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as T,r as i,u as c}from"./vendor-vue-reactivity-CheHbvBM.js";import{a as j}from"./vendor-vue-shared-DrzsEcag.js";import"./admin-BM775jCq.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"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";import"./Wrapper-DuPkIHyx.js";import"./TemplateList-uj7mPxPY.js";import"./ThemeToggle-a3yohy6x.js";import"./TemplateSteps-C_EAXe40.js";import"./useDebounce-BhrOLTj2.js";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-vue-flow-CRbOssRZ.js";const F={class:"ccb-calculator-card-wrapper"},M={class:"ccb-calculator-card__preview"},O=["src"],R={class:"ccb-calculator-card__footer"},q={class:"ccb-calculator-card__title"},A={class:"ccb-calculator-card__actions"},Co=N({__name:"CalculatorCard",props:{calculator:{}},emits:["toggle-select-calculator","delete-calculator","duplicate-calculator","edit-calculator"],setup(b,{emit:f}){const C=y(),w=b,{calculator:t}=T(w),a=f,l=i(!1),r=i(!1),g=i({right:0}),k=i([{label:"Embed",icon:"ccb-icon-ic_embed",onClick:()=>{l.value=!1,r.value=!0}},{label:"Duplicate",icon:"ccb-icon-ic_duplicate",onClick:()=>{a("duplicate-calculator",t.value.id)}},{label:"Delete",icon:"ccb-icon-ic_delete",type:"red-ghost",onClick:()=>{a("delete-calculator",t.value.id)}}]),h=()=>{a("edit-calculator",t.value.id)},d=()=>{l.value=!l.value},u=$(()=>C.getSelectedIds.includes(+t.value.id)),x=m=>{a("toggle-select-calculator",m)};return(m,e)=>(s(),z("div",F,[o("div",{class:j(["ccb-calculator-card",{"ccb-calculator-card--checked":u.value,"ccb-calculator-card--dropdown-open":l.value}])},[o("div",M,[o("img",{src:c(t).image,alt:"Calculator Preview"},null,8,O)]),o("div",R,[o("div",q,[n(E,{name:"bounce"},{default:I(()=>[n(c(V),{modelValue:u.value,onChangeSingle:e[0]||(e[0]=S=>x(c(t).id))},null,8,["modelValue"])]),_:1}),n(c(D),{text:c(t).title,size:"l",weight:"bold"},null,8,["text"])]),o("div",A,[o("div",{class:"ccb-calculator-card__action edit",onClick:p(h,["stop"])},e[2]||(e[2]=[o("i",{class:"ccb-icon-ic_edit"},null,-1),o("span",null,"Edit",-1)])),o("div",{class:"ccb-calculator-card__action ccb-dropdown-menu",onClick:p(d,["stop"])},[e[3]||(e[3]=o("i",{class:"ccb-icon-ic_menu_v"},null,-1)),l.value?(s(),_(c(B),{key:0,items:k.value,position:g.value,onCloseDropdown:d},null,8,["items","position"])):v("",!0)])])])],2),r.value?(s(),_(c(P),{key:0,id:c(t).id,onClose:e[1]||(e[1]=S=>r.value=!1)},null,8,["id"])):v("",!0)]))}});export{Co as default};
//# sourceMappingURL=CalculatorCard-BNPtQXu8.js.map
