import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{A as t}from"./vendor-primevue-7po8Zk9v.js";import{$ as n,A as r,Bt as i,D as a,E as o,F as s,Ft as c,G as l,L as u,Lt as d,O as f,W as p,ht as m,k as h,lt as g}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import{t as _}from"./src-ByuP5s1t.js";import{r as v}from"./widgetTypes-DWH_HSBH.js";import{a as y,o as b}from"./widgetPropFilter-AWF4Ovcm.js";import{t as x}from"./WidgetLayoutField-Dp_aV9P0.js";var S=u({__name:`WidgetToggleSwitch`,props:p({widget:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let u=g(e,`modelValue`),p=v(),S=o(()=>b(e.widget.options,y)),C=o(()=>{let t=e.widget.options;return!t?.on&&!t?.off?null:u.value?t.on??`true`:t.off??`false`});return(e,o)=>(n(),f(x,{widget:e.widget},{default:m(()=>[a(`div`,{class:d(c(_)(`flex w-fit items-center gap-2`,!c(p)&&`ml-auto`))},[C.value?(n(),r(`span`,{key:0,class:d(c(_)(`text-sm transition-colors`,u.value?`text-node-component-slot-text`:`text-node-component-slot-text/50`))},i(C.value),3)):h(``,!0),s(c(t),l({modelValue:u.value,"onUpdate:modelValue":o[0]||=e=>u.value=e},S.value,{"aria-label":e.widget.name}),null,16,[`modelValue`,`aria-label`])],2)]),_:1},8,[`widget`]))}});export{S as default};
//# sourceMappingURL=WidgetToggleSwitch-DUt73E8h.js.map