const require_built = require('../@intlayer/config/dist/esm/built.cjs');
const require_serverContext = require('./serverContext.cjs');
const require_IntlayerServerProvider = require('./IntlayerServerProvider.cjs');

//#region ../react-intlayer/dist/esm/server/useLocale.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 useLocale = () => {
	const { defaultLocale, locales: availableLocales } = require_built.built_default?.internationalization ?? {};
	return {
		locale: require_serverContext.getServerContext(require_IntlayerServerProvider.IntlayerServerContext) ?? defaultLocale,
		defaultLocale,
		availableLocales
	};
};

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