import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
var _jsxFileName = 'src/radio/Radio.jsx';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import SwitchBase from '../switchBase';

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('span', {
        style: {
            display: 'inline-block',
            width: '8px',
            height: '8px',
            position: 'absolute',
            top: '50%',
            left: '50%',
            marginTop: '-4px',
            marginLeft: '-4px',
            borderRadius: '4px'
        },
        __source: {
            fileName: _jsxFileName,
            lineNumber: 31
        },
        __self: this
    })
};
/**
 * Radio
 */
export default function Radio(props) {
    var prefixCls = props.prefixCls,
        className = props.className,
        other = _objectWithoutProperties(props, ['prefixCls', 'className']);

    return React.createElement(SwitchBase, Object.assign({ className: classNames(prefixCls, className) }, other, { type: 'radio', __source: {
            fileName: _jsxFileName,
            lineNumber: 51
        },
        __self: this
    }));
}

Radio.propTypes = propTypes;
Radio.defaultProps = defaultProps;