import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{$n as n,Lr as r,Nn as i,Qn as a,Sr as o,Xn as s,Zn as c,er as l,ii as u,ir as d,it as f,jr as p,li as m,mr as h,oi as g,or as _,pr as v,rt as y}from"./vendor-primevue-D1-E3-0M.js";import{n as b,t as x}from"./tailwindUtil-ByInBvan.js";import{a as S,o as C,s as w}from"./widgetPropFilter-XgiARzPo.js";import{n as T,t as E}from"./WidgetLayoutField-1GF_VsrI.js";var D,O,k=t((()=>{i(),y(),x(),w(),T(),D={class:`ml-auto flex w-fit items-center gap-2`},O=_({__name:`WidgetToggleSwitch`,props:v({widget:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=p(e,`modelValue`),i=s(()=>C(e.widget.options,S)),_=s(()=>{let n=e.widget.options;return!n?.on&&!n?.off?null:t.value?n.on??`true`:n.off??`false`});return(e,s)=>(o(),a(E,{widget:e.widget},{default:r(()=>[c(`div`,D,[_.value?(o(),l(`span`,{key:0,class:g(u(b)(`text-sm transition-colors`,t.value?`text-node-component-slot-text`:`text-node-component-slot-text/50`))},m(_.value),3)):n(``,!0),d(u(f),h({modelValue:t.value,"onUpdate:modelValue":s[0]||=e=>t.value=e},i.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-EL0vfB7c.js.map