import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["checked","name","size","view","align","disabled","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef"];import"./Radio.css";import React,{useRef}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 radioPropSize=["m","l","s","xs"];export var radioPropSizeDefault=radioPropSize[0];export var radioPropView=["primary","ghost"];export var radioPropViewDefault=radioPropView[0];export var radioPropAlign=["center","top"];export var radioPropAlignDefault=radioPropAlign[0];export var cnRadio=cn("Radio");export var COMPONENT_NAME="Radio";export var Radio=React.forwardRef(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.checked,f=d.name,g=d.size,h=void 0===g?radioPropSizeDefault:g,i=d.view,j=void 0===i?radioPropViewDefault:i,k=d.align,l=void 0===k?radioPropAlignDefault:k,m=d.disabled,n=d.className,o=d.label,p=d.onChange,q=d.onFocus,r=d.onBlur,s=d.readOnly,t=d.required,u=d.step,v=d.tabIndex,w=d.inputId,x=d.inputRef,y=_objectWithoutProperties(d,_excluded);return React.createElement("label",Object.assign({},y,{className:cnRadio({size:h,view:j,disabled:m,align:l},[n]),ref:useForkRef([b,c])}),React.createElement("input",{type:"radio",name:f,className:cnRadio("Input",[cnMixFocus()]),checked:void 0!==e&&e,disabled:m,onChange:p,onFocus:q,onBlur:r,readOnly:s,required:t,step:u,id:w,tabIndex:v,ref:x}),o&&React.createElement("span",{className:cnRadio("Label")},o))});
//# sourceMappingURL=Radio.js.map