import{y as i,D as r}from"./er2hcepb.js";import{k as p,Q as b,S as u,a8 as h,ax as m,u as o,U as n,y as k,Z as f,a0 as v,V as x,Y as _}from"./vendor/json-editor-vue-gv8v06ez.js";const y=["checked","disabled"],V=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},D=p({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(t,{emit:c}){const e=i(t,"modelValue",c,{passive:!0});return(a,s)=>{const d=r;return b(),u("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[h(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=f(l=>e.value=!o(e),["enter"]))},null,40,V),[[m,o(e)]]),n("span",B,[v(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([o(e)?"":"op50","n-transition"])},[x(a.$slots,"default")],2)],8,y)}}});export{D as _};
