'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

var _defineProperty2 = require('babel-runtime/helpers/defineProperty');

var _defineProperty3 = _interopRequireDefault(_defineProperty2);

exports['default'] = Divider;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var __rest = undefined && undefined.__rest || function (s, e) {
    var t = {};
    for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
    }if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
        if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
    }return t;
};
function Divider(_a) {
    var _classNames;

    var _a$prefixCls = _a.prefixCls,
        prefixCls = _a$prefixCls === undefined ? 'ant' : _a$prefixCls,
        _a$type = _a.type,
        type = _a$type === undefined ? 'horizontal' : _a$type,
        className = _a.className,
        children = _a.children,
        restProps = __rest(_a, ["prefixCls", "type", "className", "children"]);

    var classString = (0, _classnames2['default'])(className, prefixCls + '-divider', (_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls + '-divider-' + type, true), (0, _defineProperty3['default'])(_classNames, prefixCls + '-divider-with-text', children), _classNames));
    return _react2['default'].createElement(
        'div',
        (0, _extends3['default'])({ className: classString }, restProps),
        children && _react2['default'].createElement(
            'span',
            { className: prefixCls + '-divider-inner-text' },
            children
        )
    );
}
module.exports = exports['default'];