import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","onChange","checked","multiple","icon","onlyIcon","name","iconSize","disabled","className"];import React,{forwardRef}from"react";import{useFlag}from"../../../hooks/useFlag";import{cnMixFocus}from"../../../mixs/MixFocus/MixFocus";import{cnChoiceGroup}from"../ChoiceGroup";export var ChoiceGroupItem=forwardRef(function(a,b){var c=a.label,d=a.onChange,e=a.checked,f=a.multiple,g=a.icon,h=a.onlyIcon,i=a.name,j=a.iconSize,k=a.disabled,l=void 0!==k&&k,m=a.className,n=_objectWithoutProperties(a,_excluded),o=useFlag(),p=_slicedToArray(o,2),q=p[0],r=p[1];return React.createElement("label",Object.assign({className:cnChoiceGroup("Label",{focus:q,checked:e,disabled:l},[cnMixFocus(),m]),title:h?c:void 0,ref:b},n),React.createElement("input",{type:f?"checkbox":"radio",className:cnChoiceGroup("Input"),checked:e,onFocus:r.on,onBlur:r.off,value:"".concat(i,"-").concat(c),onChange:d,name:i,disabled:l}),g&&React.createElement(g,{className:cnChoiceGroup("Icon"),size:j}),!h&&React.createElement("span",{className:cnChoiceGroup("Text")},c))});
//# sourceMappingURL=ChoiceGroup-Item.js.map