import React, { createContext, useContext, useMemo } from "react";
import { jsx } from "react/jsx-runtime";
const LanguageContext = createContext(void 0);
const useLanguage = (fallbackLanguage) => {
	const context = useContext(LanguageContext);
	if (!context) return { language: fallbackLanguage };
	return context;
};
var LanguageProvider = ({ children, language }) => {
	const value = useMemo(() => ({ language }), [language]);
	return /* @__PURE__ */ jsx(LanguageContext.Provider, {
		value,
		children
	});
};
var language_default = LanguageProvider;
export { language_default as n, useLanguage as r, LanguageContext as t };

//# sourceMappingURL=language.js.map