/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-af8d194 | Cube Dev Team */
import { NotificationsContext } from "../NotificationsContext/NotificationsContext.js";
import { useContext } from "react";
import invariant from "tiny-invariant";

//#region src/components/overlays/NewNotifications/hooks/use-notifications-api.ts
function useNotificationsApi() {
	const context = useContext(NotificationsContext);
	invariant(context !== null, "You can't use Notifications outside of the <Root /> component. Please, check if your component is descendant of <Root/> component");
	return context.api;
}

//#endregion
export { useNotificationsApi };
//# sourceMappingURL=use-notifications-api.js.map