import{p as n,ar as o,as as i,U as c,W as r,ab as u,aA as b,X as l,a1 as h,Y as p}from"./vendor/json-editor-vue-kcahofzr.js";const m=["checked","disabled"],v=["disabled"],k=n({__name:"NSwitch",props:o({disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const s=i(t,"modelValue");return(a,e)=>(c(),r("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:s.value||null,disabled:a.disabled||null},[u(l("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>s.value=d),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:e[1]||(e[1]=h(d=>s.value=!s.value,["enter"]))},null,40,v),[[b,s.value]]),e[2]||(e[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)),p(a.$slots,"default")],8,m))}});export{k as _};
