// import defaultSettings from '@/settings'
import i18n from '@/lang'
import Cookies from 'js-cookie'

// const title = defaultSettings.title || 'Vue Element Admin'
const title = Cookies.get('language') && Cookies.get('language') === 'zh' ? '网络广播终端' : 'Network broadcast terminal'

export default function getPageTitle(key) {
  const hasKey = i18n.te(`route.${key}`)
  if (hasKey) {
    const pageName = i18n.t(`route.${key}`)
    return `${pageName} - ${title}`
  }
  return `${title}`
}
