"use client";
import{a as n,e as l,f as i}from"./chunk-WIULUOTZ.js";import{a as u}from"./chunk-VWS2Q7O3.js";import{d as m,i as p}from"./chunk-CLTGASR6.js";import{forwardRef as A,useEffect as R,useRef as E}from"react";import{faCheck as M,faMinus as P}from"@fortawesome/free-solid-svg-icons";import{FontAwesomeIcon as b}from"@fortawesome/react-fontawesome";import r from"clsx";import{jsx as c,jsxs as H}from"react/jsx-runtime";var h=A(({className:x,indeterminate:o,name:d,value:k,...f},C)=>{let{checked:s,disabled:I,focusVisible:N,getInputProps:S,readOnly:w}=u(f),t=E(null),a=p(C,t),y=m(f),e=n({checked:s,disabled:I,focusVisible:N,indeterminate:o,readOnly:w});return R(()=>{t?.current&&typeof o<"u"&&(t.current.indeterminate=o)},[o,a]),H(l,{className:r(x,e.root),children:[s&&c(b,{className:r(e.icon),icon:M}),o&&!s&&c(b,{className:r(e.icon),icon:P}),c(i,{...S(),...y,className:r(e.input),name:d,ref:a,type:"checkbox",value:k})]})});h.displayName="Checkbox";var F=h;export{F as a};
