import { IconFont } from '@zgfe/business-lib';
import { Radio, Tooltip } from 'antd';
import React from 'react';
import { classPrefix } from '..';
var FusionRadio = function FusionRadio(props) {
  var _props$options;
  var onChange = function onChange(_ref) {
    var value = _ref.target.value;
    props.onChange && props.onChange(value);
  };
  return /*#__PURE__*/React.createElement(Radio.Group, {
    value: props.value,
    onChange: onChange
  }, (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (item) {
    return /*#__PURE__*/React.createElement(Radio, {
      value: item.value,
      key: item.value
    }, /*#__PURE__*/React.createElement("span", {
      className: "".concat(classPrefix, "-radio-label")
    }, item.label, (item === null || item === void 0 ? void 0 : item.tip) && /*#__PURE__*/React.createElement(Tooltip, {
      title: item.tip
    }, /*#__PURE__*/React.createElement(IconFont, {
      className: "".concat(classPrefix, "-radio-icon"),
      type: "tishi"
    }))));
  }));
};
export default FusionRadio;