function _class_call_check(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
    }
}
function _defineProperties(target, props) {
    for(var i = 0; i < props.length; i++){
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
    }
}
function _create_class(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
import { createContext } from 'react';
export var TabItemRefs = /*#__PURE__*/ function() {
    "use strict";
    function TabItemRefs() {
        _class_call_check(this, TabItemRefs);
        _define_property(this, "items", []);
    }
    _create_class(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);
            }
        }
    ]);
    return TabItemRefs;
}();
export var TabsContext = /*#__PURE__*/ createContext(null);
