const require_getIntlayer = require('../getIntlayer.cjs');
const require_serverContext = require('./serverContext.cjs');
const require_IntlayerServerProvider = require('./IntlayerServerProvider.cjs');

//#region ../react-intlayer/dist/esm/server/useIntlayer.mjs
/**
* On the server side, Hook that picking one dictionary by its key and return the content
*
* If the locale is not provided, it will use the locale from the server context
*/
const useIntlayer = (key, locale) => {
	return require_getIntlayer.getIntlayer(key, locale ?? require_serverContext.getServerContext(require_IntlayerServerProvider.IntlayerServerContext));
};

//#endregion
exports.useIntlayer = useIntlayer;
//# sourceMappingURL=useIntlayer.cjs.map