import{d as i,Y as r,o as p,m as b,G as u,cx as h,f as o,k as n,l as k,ac as m,i as f,a8 as v,D as x,a4 as _}from"./zEcrVex8.js";const V=["checked","disabled"],y=["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"},w=i({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=_;return p(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[u(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]=m(l=>e.value=!o(e),["enter"]))},null,40,y),[[h,o(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:x([o(e)?"":"op50","n-transition"])},[v(a.$slots,"default")],2)],8,V)}}});export{w as _};
