import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import SwitchBase from '../switchBase';
import RadioButtonChecked from '../icons/internals/RadioButtonChecked';
import RadioButtonUnchecked from '../icons/internals/RadioButtonUnchecked';
var propTypes = {
  prefixCls: PropTypes.string,

  /** 标签文本 */
  label: PropTypes.node,

  /** 是否禁用 */
  disabled: PropTypes.bool,

  /** 选中状态（适用于受控组件） */
  checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),

  /** 选中状态默认值 */
  defaultChecked: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),

  /** 选中状态icon */
  checkedIcon: PropTypes.node,
  className: PropTypes.string,

  /** 未选中状态icon */
  uncheckedIcon: PropTypes.node,

  /** 获取input的ref */
  inputRef: PropTypes.func,

  /** 选中状态改变时的回调 function(e, checked) */
  onChange: PropTypes.func
};
var defaultProps = {
  defaultChecked: false,
  prefixCls: 'ne-radio',
  disabled: false,
  checkedIcon: React.createElement(RadioButtonChecked, null),
  uncheckedIcon: React.createElement(RadioButtonUnchecked, null)
};
/**
 * Radio
 */

export default function Radio(props) {
  var prefixCls = props.prefixCls,
      className = props.className,
      other = _objectWithoutProperties(props, ["prefixCls", "className"]);

  return React.createElement(SwitchBase, _extends({
    className: classNames(prefixCls, className)
  }, other, {
    type: "radio"
  }));
}
Radio.propTypes = propTypes;
Radio.defaultProps = defaultProps;