'use strict';

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

var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');

var TabItemRefs = /*#__PURE__*/function () {
  function TabItemRefs(value) {
    _rollupPluginBabelHelpers.classCallCheck(this, TabItemRefs);
    _rollupPluginBabelHelpers.defineProperty(this, "items", []);
    _rollupPluginBabelHelpers.defineProperty(this, "current", 0);
    this.current = value || 0;
  }
  return _rollupPluginBabelHelpers.createClass(TabItemRefs, [{
    key: "register",
    value: function register(ref) {
      this.items.push(ref);
      return this.items.length - 1;
    }
  }, {
    key: "unregister",
    value: function unregister(ref) {
      this.items.splice(this.items.indexOf(ref), 1);
    }
  }, {
    key: "setCurrent",
    value: function setCurrent(value) {
      this.current = value;
    }
  }]);
}();
var TabsContext = /*#__PURE__*/React.createContext(null);

exports.TabItemRefs = TabItemRefs;
exports.TabsContext = TabsContext;
