require("./chunk-9hOWP6kD.cjs");
let react = require("react");
//#region ../../platform/i18n/src/translation-api-context-factory.ts
function createTranslationContext(domainName) {
	const Ctx = (0, react.createContext)(null);
	function useTranslation() {
		const api = (0, react.use)(Ctx);
		if (!api) throw new Error(`use${domainName}Translation must be used within a ${domainName}TranslationProvider`);
		return api;
	}
	return {
		Context: Ctx,
		Provider: Ctx.Provider,
		useTranslation
	};
}
//#endregion
Object.defineProperty(exports, "createTranslationContext", {
	enumerable: true,
	get: function() {
		return createTranslationContext;
	}
});

//# sourceMappingURL=translation-api-context-factory-mbsJk2UU.cjs.map