/** @license MIT | @cube-dev/ui-kit v0.123.0 | Cube Dev Team */
import { createContext, useContext, useMemo } from "react";
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";

//#region src/providers/TrackingProvider.tsx
const TrackingContext = createContext({ event() {} });
function TrackingProvider({ children, event }) {
	const tracking = useMemo(() => ({ event }), [event]);
	if (!event) return /* @__PURE__ */ jsx(Fragment$1, { children });
	return /* @__PURE__ */ jsx(TrackingContext.Provider, {
		value: tracking,
		children
	});
}
function useTracking() {
	return useContext(TrackingContext);
}

//#endregion
export { TrackingProvider, useTracking };
//# sourceMappingURL=TrackingProvider.js.map