import{i as m,m as o,e as t,n as d,a as s,d as n,u as b,g as p,v as h}from"./index-DF5uCdwt.js";const k=["aria-checked","disabled"],g={key:0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor","stroke-width":"2"},x={key:0},V=m({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:i}){const a=e,c=i,u=()=>{a.disabled||c("update:modelValue",!a.modelValue)};return(l,r)=>(o(),t("label",{class:d(["inline-flex items-center gap-2 cursor-pointer text-[13px] select-none",{"opacity-40 cursor-not-allowed":e.disabled}])},[s("button",{type:"button",role:"checkbox","aria-checked":e.modelValue,disabled:e.disabled,class:d(["w-[18px] h-[18px] rounded-[4px] border-[1.5px] grid place-items-center transition-colors",e.modelValue?"bg-[var(--wdot-color-primary-600)] border-[var(--wdot-color-primary-600)] text-white":"border-[var(--wdot-border-strong)] bg-[var(--wdot-bg)]"]),onClick:u},[e.modelValue?(o(),t("svg",g,[...r[0]||(r[0]=[s("path",{d:"M2 6l3 3 5-6","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):n("",!0)],10,k),e.label||l.$slots.default?(o(),t("span",x,[b(l.$slots,"default",{},()=>[p(h(e.label),1)])])):n("",!0)],2))}});export{V as _};
