import _extends from "@babel/runtime/helpers/extends";
import * as React from 'react';
import RadioGroup from '../radio-group';
import './index.less';
export default (function (props) {
  var title = props.title,
    dataList = props.dataList,
    styleKey = props.styleKey,
    children = props.children,
    styleData = props.styleData,
    _props$contentStyle = props.contentStyle,
    contentStyle = _props$contentStyle === void 0 ? {} : _props$contentStyle,
    value = props.value,
    longTitle = props.longTitle;
  return /*#__PURE__*/React.createElement("div", {
    className: "row-container"
  }, title && /*#__PURE__*/React.createElement("div", {
    className: styleData[styleKey] ? (!longTitle ? 'title-contaienr' : 'title-contaienr-long') + " title-text title-text-active" : (!longTitle ? 'title-contaienr' : 'title-contaienr-long') + " title-text"
  }, title), /*#__PURE__*/React.createElement("div", {
    className: "content-container",
    style: contentStyle
  }, children ? children : /*#__PURE__*/React.createElement(RadioGroup, _extends({
    dataList: dataList
  }, props, {
    // @ts-ignore
    // 区分是style类型的值还是其他普通的值，从styleData获取的是对象
    value: typeof value != 'string' ? styleData && styleData[styleKey] : value
  }))));
});