import "./assets/style.css";
import "@fortawesome/fontawesome-free/css/fontawesome.min.css";
import "@fortawesome/fontawesome-free/css/brands.min.css";
import "@fortawesome/fontawesome-free/css/solid.min.css";
import "@fortawesome/fontawesome-free/css/regular.min.css";
import "./assets/Fira_Code_v6.2/fira_code.css";

import { createApp } from "vue";
import { createI18n } from "vue-i18n";
import translations from "./locales";
import App from "./App.vue";

const navigatorLanguage = navigator.language
	.substring(0, 2)
	.toLocaleLowerCase();
const locale =
	["en", "fr"].includes(navigatorLanguage) ? navigatorLanguage : "fr";

const i18n = createI18n({
	legacy: false, // you must set `false`, to use Composition API
	locale: locale, // set locale
	fallbackLocale: "fr", // set fallback locale,
	messages: translations,
});

createApp(App).use(i18n).mount("#app");
