"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get TabItemRefs () {
        return TabItemRefs;
    },
    get TabsContext () {
        return TabsContext;
    }
});
const _react = require("react");
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;
}
class TabItemRefs {
    register(ref) {
        this.items.push(ref);
        return this.items.length - 1;
    }
    unregister(ref) {
        this.items.splice(this.items.indexOf(ref), 1);
    }
    setCurrent(value) {
        this.current = value;
    }
    constructor(value){
        _define_property(this, "items", []);
        _define_property(this, "current", 0);
        this.current = value || 0;
    }
}
const TabsContext = /*#__PURE__*/ (0, _react.createContext)(null);
