"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    useNodeManifests: ()=>useNodeManifests,
    useOptionalNodeTypeRegistry: ()=>useOptionalNodeTypeRegistry,
    useNodeManifest: ()=>useNodeManifest,
    NodeRegistryContext: ()=>NodeRegistryContext,
    useNodeTypeRegistry: ()=>useNodeTypeRegistry
});
const external_react_namespaceObject = require("react");
const NodeRegistryContext = (0, external_react_namespaceObject.createContext)(null);
const useNodeTypeRegistry = ()=>{
    const context = (0, external_react_namespaceObject.useContext)(NodeRegistryContext);
    if (!context) throw new Error('useNodeTypeRegistry must be used within a NodeRegistryProvider');
    return context.registry;
};
const useOptionalNodeTypeRegistry = ()=>{
    const context = (0, external_react_namespaceObject.useContext)(NodeRegistryContext);
    return context?.registry ?? null;
};
const useNodeManifests = ()=>{
    const registry = useNodeTypeRegistry();
    return (0, external_react_namespaceObject.useMemo)(()=>registry.getAllManifests(), [
        registry
    ]);
};
const useNodeManifest = (nodeType)=>{
    const registry = useNodeTypeRegistry();
    return (0, external_react_namespaceObject.useMemo)(()=>registry.getManifest(nodeType), [
        registry,
        nodeType
    ]);
};
exports.NodeRegistryContext = __webpack_exports__.NodeRegistryContext;
exports.useNodeManifest = __webpack_exports__.useNodeManifest;
exports.useNodeManifests = __webpack_exports__.useNodeManifests;
exports.useNodeTypeRegistry = __webpack_exports__.useNodeTypeRegistry;
exports.useOptionalNodeTypeRegistry = __webpack_exports__.useOptionalNodeTypeRegistry;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "NodeRegistryContext",
    "useNodeManifest",
    "useNodeManifests",
    "useNodeTypeRegistry",
    "useOptionalNodeTypeRegistry"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
