import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _Radio from "@alifd/next/es/radio";
import React, { Component } from "react";
import BoxSlotComponent from "./boxSlotComponent";
import "./index.less";
var BoxGroup = function BoxGroup(props) {
  var title = props.title,
    value = props.value,
    groupList = props.groupList,
    _onChange = props.onChange;
  return /*#__PURE__*/React.createElement("div", {
    className: "boxGroupItem"
  }, /*#__PURE__*/React.createElement(BoxSlotComponent, {
    title: title
  }, /*#__PURE__*/React.createElement(_Radio.Group, {
    name: "listDataSource",
    onChange: function onChange(e) {
      return _onChange(e);
    },
    shape: "button",
    value: value
  }, groupList.map(function (item) {
    return /*#__PURE__*/React.createElement(_Radio, {
      style: {
        width: 100 / groupList.length + "%",
        textAlign: "center"
      },
      value: item.value,
      key: item.value
    }, item.label);
  }))));
};
var _default = /*#__PURE__*/function (_Component) {
  function _default() {
    return _Component.apply(this, arguments) || this;
  }
  _inheritsLoose(_default, _Component);
  var _proto = _default.prototype;
  _proto.render = function render() {
    return /*#__PURE__*/React.createElement(BoxGroup, this.props);
  };
  return _default;
}(Component);
export { _default as default };