import{T as D,w as _}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{_ as b}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 z,e as N,f as $,i as n,x as o,k as v,t as w,j as i,m as I}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as R,r,u as t}from"./vendor-vue-reactivity-CheHbvBM.js";import{a as T}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 j={class:"ccb-calculator-row-wrapper"},F={class:"ccb-calculator-row__checkbox"},M={class:"ccb-calculator-row__id"},O={class:"ccb-calculator-row__icon"},q=["src"],A={class:"ccb-calculator-row__actions"},fo=z({__name:"CalculatorRow",props:{calculator:{}},emits:["toggle-select-calculator","delete-calculator","duplicate-calculator","edit-calculator"],setup(f,{emit:C}){const g=y(),k=f,{calculator:e}=R(k),a=C,c=r(!1),s=r(!1),h=r({top:2,right:2}),x=r([{label:"Embed",icon:"ccb-icon-ic_embed",onClick:()=>{c.value=!1,s.value=!0}},{label:"Duplicate",icon:"ccb-icon-ic_duplicate",onClick:()=>{a("duplicate-calculator",e.value.id)}},{label:"Delete",icon:"ccb-icon-ic_delete",type:"red-ghost",onClick:()=>{a("delete-calculator",e.value.id)}}]),u=()=>{a("edit-calculator",e.value.id)},d=()=>{c.value=!c.value},m=N(()=>g.getSelectedIds.includes(+e.value.id)),S=p=>{a("toggle-select-calculator",p)};return(p,l)=>(n(),$("div",j,[o("div",{class:T(["ccb-calculator-row",{"ccb-calculator-row--checked":m.value,"ccb-calculator-row--dropdown-open":c.value}])},[i(D,{name:"bounce"},{default:I(()=>[o("div",F,[i(t(V),{modelValue:m.value,onChangeSingle:l[0]||(l[0]=E=>S(t(e).id))},null,8,["modelValue"])])]),_:1}),o("div",M,[i(t(b),{text:t(e).id?t(e).id.toString():"",size:"m",weight:"regular"},null,8,["text"])]),o("div",O,[o("img",{src:t(e).icon,alt:"Calculator Preview"},null,8,q)]),o("div",{class:"ccb-calculator-row__title",onClick:u},[i(t(b),{text:t(e).title,size:"l",weight:"bold"},null,8,["text"])]),o("div",A,[o("div",{class:"ccb-calculator-row__action ccb-dropdown-menu",onClick:_(d,["stop"])},[l[2]||(l[2]=o("i",{class:"ccb-icon-ic_menu_v"},null,-1)),c.value?(n(),v(t(B),{key:0,items:x.value,position:h.value,onCloseDropdown:d},null,8,["items","position"])):w("",!0)]),o("div",{class:"ccb-calculator-row__action edit",onClick:_(u,["stop"])},l[3]||(l[3]=[o("i",{class:"ccb-icon-ic_edit"},null,-1),o("span",null,"Edit",-1)]))])],2),s.value?(n(),v(t(P),{key:0,id:t(e).id,onClose:l[1]||(l[1]=E=>s.value=!1)},null,8,["id"])):w("",!0)]))}});export{fo as default};
//# sourceMappingURL=CalculatorRow-B2O7Mwcc.js.map
