/* jshint -W097 */ // don't warn about "use strict"
"use strict";

import {createApp} from 'vue';
import {createI18n} from 'vue-i18n';
import App from './NervTN.vue';
import store from './nervtn-state';
import router from './nervtn-routes';

var languages = navigator.languages;
if(languages===undefined||languages.length<1) {
    languages = [navigator.language];
}

if(!languages[0]) {
    languages = ['en'];
}

const app = createApp(App);

app.use(createI18n({
    locale: languages[0].trim().split(/-|_/)[0],
    fallbackLocale: 'en',
    legacy: false,
    globalInjection: true
}));
app.use(router);
app.use(store);
app.mount('#app');
