const require_getDictionary = require('../getDictionary.cjs');
const require_serverContext = require('./serverContext.cjs');
const require_IntlayerServerProvider = require('./IntlayerServerProvider.cjs');

//#region ../react-intlayer/dist/esm/server/useDictionary.mjs
/**
* On the server side, Hook that transform a dictionary and return the content
*
* If the locale is not provided, it will use the locale from the server context
*/
const useDictionary = (dictionary, locale) => {
	return require_getDictionary.getDictionary(dictionary, locale ?? require_serverContext.getServerContext(require_IntlayerServerProvider.IntlayerServerContext));
};

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