const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
const require_localeStorage = require('../@intlayer/core/dist/esm/utils/localeStorage.cjs');
const require_getBrowserLocale = require('../@intlayer/core/dist/esm/localization/getBrowserLocale.cjs');
let react = require("react");

//#region ../react-intlayer/dist/esm/client/useLocaleStorage.mjs
/**
* Get the locale cookie
*/
/**
* Get the locale cookie
*/
const localeInStorage = require_localeStorage.getLocaleFromStorage(require_getBrowserLocale.localeStorageOptions);
/**
* @deprecated Use localeInStorage instead
*
* Get the locale cookie
*/
const localeCookie = localeInStorage;
/**
* Set the locale cookie
*/
const setLocaleInStorage$1 = (locale, isCookieEnabled) => require_localeStorage.setLocaleInStorage(locale, {
	...require_getBrowserLocale.localeStorageOptions,
	isCookieEnabled
});
/**
* @deprecated Use setLocaleInStorage instead
*
* Set the locale cookie
*/
const setLocaleCookie = setLocaleInStorage$1;
/**
* Hook that provides the locale cookie and a function to set it
*/
const useLocaleStorage = (isCookieEnabled) => (0, react.useMemo)(() => require_localeStorage.LocaleStorage({
	...require_getBrowserLocale.localeStorageOptions,
	isCookieEnabled
}), [isCookieEnabled]);
/**
* @deprecated Use useLocaleStorage instead
*
* For GDPR compliance, use useLocaleStorage instead
*
* Hook that provides the locale cookie and a function to set it
*/
const useLocaleCookie = (isCookieEnabled) => {
	const storage = useLocaleStorage(isCookieEnabled);
	return {
		localeCookie: storage.getLocale(),
		setLocaleCookie: storage.setLocale
	};
};

//#endregion
exports.localeCookie = localeCookie;
exports.localeInStorage = localeInStorage;
exports.setLocaleCookie = setLocaleCookie;
exports.setLocaleInStorage = setLocaleInStorage$1;
exports.useLocaleCookie = useLocaleCookie;
exports.useLocaleStorage = useLocaleStorage;
//# sourceMappingURL=useLocaleStorage.cjs.map