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

//#region src/components/navigation/Tabs/TabsContext.tsx
const TabsContext = createContext(null);
TabsContext.displayName = "TabsContext";
function TabsProvider({ value, children }) {
	return /* @__PURE__ */ jsx(TabsContext.Provider, {
		value,
		children
	});
}
function useTabsContext() {
	const context = useContext(TabsContext);
	if (!context) throw new Error("useTabsContext must be used within a TabsProvider");
	return context;
}
/**
* Optional hook to get TabsContext value.
* Returns null when used outside a TabsProvider (e.g., for TabsAction in standalone usage).
*/
function useOptionalTabsContext() {
	return useContext(TabsContext);
}

//#endregion
export { TabsProvider, useOptionalTabsContext, useTabsContext };
//# sourceMappingURL=TabsContext.js.map