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