import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Checkbox.css";import React from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var checkboxPropSize=["m","xs","s","l"];export var checkboxPropSizeDefault=checkboxPropSize[0];export var checkboxPropView=["primary","ghost"];export var checkboxPropViewDefault=checkboxPropView[0];export var checkboxPropAlign=["center","top"];export var checkboxPropAlignDefault=checkboxPropAlign[0];export var COMPONENT_NAME="Checkbox";export var cnCheckbox=cn("Checkbox");export var Checkbox=React.forwardRef(function(a,b){var c=React.useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?checkboxPropSizeDefault:g,i=d.view,j=void 0===i?checkboxPropViewDefault:i,k=d.align,l=void 0===k?checkboxPropAlignDefault:k,m=d.disabled,n=d.intermediate,o=d.className,p=d.label,q=d.onChange,r=d.onFocus,s=d.onBlur,t=d.readOnly,u=d.required,v=d.step,w=d.tabIndex,x=d.inputId,y=d.inputRef,z=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},z,{className:cnCheckbox({size:h,view:j,disabled:m,intermediate:void 0!==n&&n,align:l},[o]),ref:useForkRef([b,c])}),React.createElement("input",{type:"checkbox",name:f,className:cnCheckbox("Input",[cnMixFocus()]),checked:void 0!==e&&e,id:x,disabled:m,onChange:q,onFocus:r,onBlur:s,readOnly:t,required:u,step:v,tabIndex:w,ref:y}),p&&React.createElement("span",{className:cnCheckbox("Label")},p))});
//# sourceMappingURL=Checkbox.js.map