const appConfigList = [
  {
    title: '商业数据分析实验室',
    logo: 'https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg',
    hosts: ['saas-lab']
  },
  {
    system: 'game',
    title: '商业数据分析竞赛平台',
    hosts: ['saas-game']
  },
  {
    system: 'dml',
    title: '数字营销实验室',
    logo: 'https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg',
    hosts: ['saas-dml-web']
  },
  {
    title: '2023年全国大学生商业数据分析与应用大赛',
    logo: 'https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg',
    hosts: ['dasai']
  }
]

export function useAppConfig() {
  const found = appConfigList.find(item => {
    return item.hosts.find(host => location.host.includes(host))
  })

  const appConfig = found || appConfigList[0]

  return { ...appConfig }
}
