const require_chunk = require("./chunk-9hOWP6kD.cjs");
let react = require("react");
react = require_chunk.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region ../widgets/src/contexts/WidgetInteractionContext.tsx
const WidgetInteractionContext = (0, react.createContext)({});
function WidgetInteractionProvider({ onItemClick, onNavigate, buildHref, children }) {
	const value = (0, react.useMemo)(() => {
		const ctx = {};
		if (onItemClick) ctx.onItemClick = onItemClick;
		if (onNavigate) ctx.onNavigate = onNavigate;
		if (buildHref) ctx.buildHref = buildHref;
		return ctx;
	}, [
		onItemClick,
		onNavigate,
		buildHref
	]);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WidgetInteractionContext.Provider, {
		value,
		children
	});
}
function useWidgetInteraction() {
	return (0, react.useContext)(WidgetInteractionContext);
}
//#endregion
Object.defineProperty(exports, "WidgetInteractionProvider", {
	enumerable: true,
	get: function() {
		return WidgetInteractionProvider;
	}
});
Object.defineProperty(exports, "useWidgetInteraction", {
	enumerable: true,
	get: function() {
		return useWidgetInteraction;
	}
});

//# sourceMappingURL=WidgetInteractionContext-BhkusA95.cjs.map