export const useLang = async (langFileContent: any) => {
  const objLang = ref<any>({})
  const newLang = ref<string>('en_US')

  const getFileContent = async () => {
    if(langFileContent[newLang.value]) {
      objLang.value = langFileContent[newLang.value]
      console.log(objLang.value)
    }
  }

  onMounted(async () => {
    const getLang = localStorage.getItem('logship_lang')
    if(getLang) {
      newLang.value = getLang
      console.log(newLang.value)
    }
    await getFileContent()
  })

  watch(newLang, getFileContent)

  return objLang
}