'use client';


import { IntlayerClientContext } from "./IntlayerProvider.mjs";
import { getTranslation } from "../@intlayer/core/dist/esm/interpreter/getTranslation.mjs";
import { useContext } from "react";

//#region ../react-intlayer/dist/esm/client/t.mjs
/**
* On the client side, this function returns the translation of the provided multilang content.
*
* If the locale is not provided, it will use the locale from the client context
*/
const t = (multilangContent, locale) => {
	const { locale: currentLocale } = useContext(IntlayerClientContext);
	return getTranslation(multilangContent, locale ?? currentLocale);
};

//#endregion
export { t };
//# sourceMappingURL=t.mjs.map