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-Cg-HmKZY.js";import{n as b,t as x}from"./tailwindUtil-F1kyO01s.js";import{i as S,r as C}from"./widgetTypes-B2p76Yu_.js";import{a as w,o as T,s as E}from"./widgetPropFilter-BN2p2qia.js";import{n as D,t as O}from"./WidgetLayoutField-Cnd0sCOy.js";var k,A=t((()=>{a(),g(),C(),x(),E(),D(),k=v({__name:`WidgetToggleSwitch`,props:h({widget:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=i(e,`modelValue`),a=S(),h=c(()=>T(e.widget.options,w)),g=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(O,{widget:e.widget},{default:s(()=>[l(`div`,{class:_(u(b)(`flex w-fit items-center gap-2`,!u(a)&&`ml-auto`))},[g.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(g.value),3)):n(``,!0),d(u(m),p({modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e},h.value,{"aria-label":e.widget.name}),null,16,[`modelValue`,`aria-label`])],2)]),_:1},8,[`widget`]))}})})),j;t((()=>{A(),A(),j=k}))();export{j as default};
//# sourceMappingURL=WidgetToggleSwitch-Dz-0iILV.js.map