import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2023-2025 GoodData Corporation
import { createContext, useContext } from "react";
import { invariant } from "ts-invariant";
const OrganizationIdContext = createContext(undefined);
OrganizationIdContext.displayName = "OrganizationIdContext";
export function OrganizationIdProvider({ organizationId, children }) {
    return _jsx(OrganizationIdContext.Provider, { value: organizationId, children: children });
}
export const useOrganizationId = () => {
    const organizationId = useContext(OrganizationIdContext);
    invariant(organizationId, "useOrganizationId must be called in OrganizationIdProvider with initialized value!");
    return organizationId;
};
//# sourceMappingURL=OrganizationIdContext.js.map