import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
var _jsxFileName = 'src/panel/panelContent.jsx';
/**
 * content.jsx
 *
 * @Author: apple
 * @Date: 2018/1/29 18:01
 */

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

/**
 * Panel.Content
 * */

var PanelContent = function (_React$PureComponent) {
    _inherits(PanelContent, _React$PureComponent);

    function PanelContent() {
        _classCallCheck(this, PanelContent);

        return _possibleConstructorReturn(this, (PanelContent.__proto__ || Object.getPrototypeOf(PanelContent)).apply(this, arguments));
    }

    _createClass(PanelContent, [{
        key: 'render',
        value: function render() {
            var _props = this.props,
                prefixCls = _props.prefixCls,
                className = _props.className,
                children = _props.children,
                other = _objectWithoutProperties(_props, ['prefixCls', 'className', 'children']);

            var classes = classNames(prefixCls, {}, className);

            return React.createElement(
                'div',
                Object.assign({ className: classes }, other, {
                    __source: {
                        fileName: _jsxFileName,
                        lineNumber: 40
                    },
                    __self: this
                }),
                children
            );
        }
    }]);

    return PanelContent;
}(React.PureComponent);

PanelContent.propTypes = {
    /**
     * 类名前缀： 默认为ne-panel
     * */
    prefixCls: PropTypes.string,
    /**
     * 传入类名
     * */
    className: PropTypes.string,
    /**
     * 传入子元素
     * */
    children: PropTypes.node
};
PanelContent.defaultProps = {
    prefixCls: 'ne-panel-content'
};


export default PanelContent;