import{d as o,Y as c,o as r,m as u,G as p,cx as h,f as a,k as l,l as b,ac as m,a8 as f}from"./zEcrVex8.js";const v=["checked","disabled"],k=["disabled"],V=o({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const e=c(d,"modelValue",i,{passive:!0});return(t,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:a(e)||null,disabled:t.disabled||null},[p(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:t.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!a(e),["enter"]))},null,40,k),[[h,a(e)]]),s[2]||(s[2]=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1)),f(t.$slots,"default")],8,v))}});export{V as _};
