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";
import React, { Component } from "react";
import AntdTabs from "antd/es/tabs";
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { DraggableTabs } from "./draggableTabs";
import PropTypes from "prop-types";
import "antd/es/tabs/style";
var TabPane = AntdTabs.TabPane;

var Tabs = function (_Component) {
    _inherits(Tabs, _Component);

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

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

    _createClass(Tabs, [{
        key: "render",
        value: function render() {
            var draggable = this.props.draggable;

            return React.createElement(
                DndProvider,
                { backend: HTML5Backend },
                draggable ? React.createElement(DraggableTabs, this.props) : React.createElement(AntdTabs, this.props)
            );
        }
    }]);

    return Tabs;
}(Component);

Tabs.propTypes = {
    draggable: PropTypes.bool
};
Tabs.defaultProps = {
    draggable: false
};
Tabs.TabPane = TabPane;
export default Tabs;