import {useI18n} from "vue-i18n";
import I18nUtils from "~/services/utils/i18nUtils";

let i18nUtilsClass:null|I18nUtils = null
export const useI18nUtils = () => {
    //Avoid memory leak
    if(i18nUtilsClass === null){
        const i18n = useI18n()
        //@ts-ignore
        i18nUtilsClass = new I18nUtils(i18n)
    }
    return i18nUtilsClass
}
