"use strict";

exports.__esModule = true;
exports.useOpenReferencedCollection = exports.OpenReferencedCollectionContext = void 0;
var _react = require("react");
/**
 * Opener that navigates to the referenced collection as an overlay, or
 * `undefined` when the host can't navigate. Provided by `ReferenceEditWrapper`
 * (mounted by EditableCell, so it — and the layer-state subscription it owns —
 * outlives the inline editor) and consumed by the reference editor.
 *
 * The editor passes the refresh to run on return (over its own dropdown
 * `collection`, which the wrapper has no reference to) as the opener's argument.
 */
const OpenReferencedCollectionContext = exports.OpenReferencedCollectionContext = /*#__PURE__*/(0, _react.createContext)(undefined);
const useOpenReferencedCollection = () => (0, _react.useContext)(OpenReferencedCollectionContext);
exports.useOpenReferencedCollection = useOpenReferencedCollection;
//# sourceMappingURL=openCollectionContext.js.map