'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var reactI18next = require('react-i18next');
var i18n = require('i18next');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var i18n__default = /*#__PURE__*/_interopDefault(i18n);

var neetoatoms = {
	colorPicker: {
		recentlyUsed: "Recently used",
		pickColor: "Pick color from screen"
	},
	alert: {
		"continue": "Continue",
		cancel: "Cancel"
	},
	multiSelect: {
		noResults: "No results found.",
		loading: "Loading…"
	},
	dataTable: {
		noResults: "No results.",
		selectRow: "Select row"
	},
	pagination: {
		previous: "Previous",
		next: "Next",
		goToPrevious: "Go to previous page",
		goToNext: "Go to next page",
		morePages: "More pages"
	},
	dialog: {
		close: "Close"
	},
	sheet: {
		close: "Close"
	},
	carousel: {
		previousSlide: "Previous slide",
		nextSlide: "Next slide"
	},
	sidebar: {
		title: "Sidebar",
		description: "Displays the mobile sidebar.",
		toggleSidebar: "Toggle Sidebar"
	},
	badge: {
		dismiss: "Dismiss"
	},
	spinner: {
		loading: "Loading"
	},
	select: {
		clearSelection: "Clear selection"
	},
	dropdownMenu: {
		openMenu: "Open dropdown menu"
	},
	breadcrumb: {
		breadcrumb: "breadcrumb",
		more: "More"
	},
	command: {
		title: "Command Palette",
		description: "Search for a command to run..."
	}
};
var enTranslations = {
	neetoatoms: neetoatoms
};

const resources = {
    en: { translation: enTranslations },
};

const initializeI18n = (language = "en") => {
    i18n__default.default.use(reactI18next.initReactI18next).init({
        resources,
        lng: language,
        fallbackLng: "en",
        interpolation: { escapeValue: false },
    });
    return i18n__default.default;
};

const TranslationProvider = ({ children, language = "en", }) => {
    const i18n = initializeI18n(language);
    React.useEffect(() => {
        if (i18n.language !== language) {
            i18n.changeLanguage(language);
        }
    }, [language, i18n]);
    return jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18n, children: children });
};
TranslationProvider.displayName = "TranslationProvider";

exports.TranslationProvider = TranslationProvider;
exports.resources = resources;
//# sourceMappingURL=TranslationProvider-DBZHXmzX.js.map
