"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "actionAsyncStorage", {
    enumerable: true,
    get: function() {
        return actionAsyncStorage;
    }
});
let createAsyncLocalStorage;
if (process.env.NEXT_RUNTIME === "edge") {
    createAsyncLocalStorage = ()=>{
        let store;
        return {
            disable () {
                throw new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");
            },
            getStore () {
                return store;
            },
            async run (s, fn) {
                store = s;
                try {
                    return await fn();
                } finally{
                    store = undefined;
                }
            },
            exit () {
                throw new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");
            },
            enterWith () {
                throw new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");
            }
        };
    };
} else {
    createAsyncLocalStorage = require("./async-local-storage").createAsyncLocalStorage;
}
const actionAsyncStorage = createAsyncLocalStorage();

if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
  Object.defineProperty(exports.default, '__esModule', { value: true });
  Object.assign(exports.default, exports);
  module.exports = exports.default;
}

//# sourceMappingURL=action-async-storage.js.map