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']
  }
]

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

  const appConfig = found || appConfigList[0]

  return { ...appConfig }
}
