import { enGB, nb, nn } from "date-fns/locale";
import { createStrictContext } from "../utils/helpers/index.js";
import en_translations from "../utils/i18n/locales/en.js";
import nn_translations from "../utils/i18n/locales/nn.js";
/** @private */
export const getLocaleFromString = (locale = "nb") => {
    switch (locale) {
        case "nn":
            return nn;
        case "en":
            return enGB;
        default:
            return nb;
    }
};
/**
 * @private
 * Temporary for backwards compatibility with locale prop. Can be removed when locale prop has been removed.
 */
export const getTranslations = (locale) => {
    switch (locale) {
        case "nn":
            return nn_translations.DatePicker;
        case "en":
        case "en-GB":
            return en_translations.DatePicker;
        default:
            return undefined;
    }
};
/**
 * @private
 * Temporary for backwards compatibility with locale prop. Can be removed when locale prop has been removed.
 */
export const getGlobalTranslations = (locale) => {
    switch (locale) {
        case "nn":
            return nn_translations.global;
        case "en":
        case "en-GB":
            return en_translations.global;
        default:
            return undefined;
    }
};
export const { Provider: DateTranslationContextProvider, useContext: useDateTranslationContext, } = createStrictContext({
    name: "DateTranslationContext",
});
//# sourceMappingURL=Date.locale.js.map