import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
var _jsxFileName = 'src/checkbox/Checkbox.jsx';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from '../icon';
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,
    /** 是否不定状态 */
    indeterminate: PropTypes.bool,
    /** 不定状态icon */
    indeterminateIcon: PropTypes.node,
    /** 获取input的ref */
    inputRef: PropTypes.func,
    /** 选中状态改变时的回调 function(e, checked) */
    onChange: PropTypes.func
};
var defaultProps = {
    defaultChecked: false,
    prefixCls: 'ne-checkbox',
    disabled: false,
    indeterminate: false,
    indeterminateIcon: React.createElement(Icon, { type: 'down-arrow', 'aria-hidden': 'true', __source: {
            fileName: _jsxFileName,
            lineNumber: 36
        },
        __self: this
    }),
    checkedIcon: React.createElement(Icon, { type: 'ok-1', 'aria-hidden': 'true', __source: {
            fileName: _jsxFileName,
            lineNumber: 37
        },
        __self: this
    })
};
/**
 * Checkbox
 */
export default function Checkbox(props) {
    var prefixCls = props.prefixCls,
        className = props.className,
        other = _objectWithoutProperties(props, ['prefixCls', 'className']);

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

Checkbox.propTypes = propTypes;
Checkbox.defaultProps = defaultProps;