import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{A as t}from"./vendor-primevue-DxVRNMbC.js";import{A as n,D as r,G as i,I as a,It as o,K as s,O as c,R as l,Rt as u,Vt as d,et as f,gt as p,j as m,k as h,ut as g}from"./vendor-vue-core-X6q-rGJs.js";import"./vendor-other-CyG3qq8S.js";import{t as _}from"./src-Bx0QZVd-.js";import{r as v}from"./widgetTypes-CUvQHbLo.js";import{a as y,o as b}from"./widgetPropFilter-AWF4Ovcm.js";import{t as x}from"./WidgetLayoutField-AgGHRP9B.js";var S=l({__name:`WidgetToggleSwitch`,props:i({widget:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let i=g(e,`modelValue`),l=v(),S=r(()=>b(e.widget.options,y)),C=r(()=>{let t=e.widget.options;return!t?.on&&!t?.off?null:i.value?t.on??`true`:t.off??`false`});return(e,r)=>(f(),h(x,{widget:e.widget},{default:p(()=>[c(`div`,{class:u(o(_)(`flex w-fit items-center gap-2`,!o(l)&&`ml-auto`))},[C.value?(f(),m(`span`,{key:0,class:u(o(_)(`text-sm transition-colors`,i.value?`text-node-component-slot-text`:`text-node-component-slot-text/50`))},d(C.value),3)):n(``,!0),a(o(t),s({modelValue:i.value,"onUpdate:modelValue":r[0]||=e=>i.value=e},S.value,{"aria-label":e.widget.name}),null,16,[`modelValue`,`aria-label`])],2)]),_:1},8,[`widget`]))}});export{S as default};
//# sourceMappingURL=WidgetToggleSwitch-CDSnrmxh.js.map