import { createI18n } from 'vue-i18n';
import {
    defaultLocaleRu,
    defaultLocaleKg,
    defaultLocaleTj,
    defaultLocaleUz,
} from '@/UI-kit/constants';

import { languagesModuleDocumentRu } from '@/modules/documents/constants/languages/ru';
import { languagesModuleDocumentTj } from '@/modules/documents/constants/languages/tj';
import { languagesModuleDocumentKg } from '@/modules/documents/constants/languages/kg';
import { languagesModuleDocumentUz } from '@/modules/documents/constants/languages/uz';

import { languagesModuleAuthRu } from '@/modules/auth/constants/languages/ru';
import { languagesModuleAuthTj } from '@/modules/auth/constants/languages/tj';
import { languagesModuleAuthKg } from '@/modules/auth/constants/languages/kg';
import { languagesModuleAuthUz } from '@/modules/auth/constants/languages/uz';

export const uiKitI18n = createI18n({
    useScope: 'local',
    locale: 'ru',
    legacy: false,
    runtimeOnly: false,
    messages: {
        ru: {
            ...defaultLocaleRu,
            moduleDocuments: languagesModuleDocumentRu,
            moduleAuth: languagesModuleAuthRu,
        },
        uz: {
            ...defaultLocaleUz,
            moduleDocuments: languagesModuleDocumentUz,
            moduleAuth: languagesModuleAuthUz,
        },
        kg: {
            ...defaultLocaleKg,
            moduleDocuments: languagesModuleDocumentKg,
            moduleAuth: languagesModuleAuthKg,
        },
        tj: {
            ...defaultLocaleTj,
            moduleDocuments: languagesModuleDocumentTj,
            moduleAuth: languagesModuleAuthTj,
        },
    },
});
