import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{$n as n,Cr as r,Mr as i,Nn as a,Qn as o,Rr as s,Xn as c,Zn as l,ai as u,ar as d,er as f,hr as p,it as m,mr as h,rt as g,si as _,sr as v,ui as y}from"./vendor-primevue-D50rA9nL.js";import{n as b,t as x}from"./tailwindUtil-CORTPblY.js";import{a as S,o as C,s as w}from"./widgetPropFilter-Bp2uptBz.js";import{n as T,t as E}from"./WidgetLayoutField-DevzxXMh.js";var D,O,k=t((()=>{a(),g(),x(),w(),T(),D={class:`ml-auto flex w-fit items-center gap-2`},O=v({__name:`WidgetToggleSwitch`,props:h({widget:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=i(e,`modelValue`),a=c(()=>C(e.widget.options,S)),h=c(()=>{let n=e.widget.options;return!n?.on&&!n?.off?null:t.value?n.on??`true`:n.off??`false`});return(e,i)=>(r(),o(E,{widget:e.widget},{default:s(()=>[l(`div`,D,[h.value?(r(),f(`span`,{key:0,class:_(u(b)(`text-sm transition-colors`,t.value?`text-node-component-slot-text`:`text-node-component-slot-text/50`))},y(h.value),3)):n(``,!0),d(u(m),p({modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e},a.value,{"aria-label":e.widget.name}),null,16,[`modelValue`,`aria-label`])])]),_:1},8,[`widget`]))}})})),A;t((()=>{k(),k(),A=O}))();export{A as default};
//# sourceMappingURL=WidgetToggleSwitch-MyxKExO-.js.map