import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
var __rest = this && this.__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;
};
import React from 'react';
import classNames from 'classnames';
export default 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 = classNames(className, prefixCls + '-divider', (_classNames = {}, _defineProperty(_classNames, prefixCls + '-divider-' + type, true), _defineProperty(_classNames, prefixCls + '-divider-with-text', children), _classNames));
    return React.createElement(
        'div',
        _extends({ className: classString }, restProps),
        children && React.createElement(
            'span',
            { className: prefixCls + '-divider-inner-text' },
            children
        )
    );
}