export default defineAppConfig({
  pages: [
    'pages/index/index',
    'pages/game/gamehome/index',
    'pages/cart/index',
    'pages/user/index',
    'pages/allClassList/index',
    'pages/game/gamedetail/index',
    'pages/game/gameview/index',
    'pages/game/view/index',
  ],
  subPackages: [
    {
      root: 'pages/users',
      pages: [
        'user_agreement/index',
        'order_list/index',
        'setting/index',
        'user_setting/index',
        'settled_mer/index',
        'order_list_detail/index',
        'account/index',
        'distribution/index',
        'distribution/integral/index',
        'distribution/userlist/index',
        'login/index',
        'bindPhone/index',
        'pending_order/index',
        'pending_order/pending_order_detail/index',
        'pwd/index',
      ],
    },
    {
      root: 'pages/goods',
      pages: [
        'goods_detail/index',
        'order_create/index',
        'order_status/index',
        'pay/index',
      ],
    },
    {
      root: 'pages/admin',
      pages: [
        'verify/index',
        'order_manage/index',
        'order_manage/list/index',
        'order_manage/detail/index',
        'verify/verify_list/index',
        'statistics/index',
        'withdrawal/index',
        'add_order/index',
        'add_order/add_table/index',
        'add_order/add_menu/index',
        'add_order/pending_order/index',
        'add_order/pending_order/pending_order_detail/index',
        'add_order/pending_order/pay/index',
        'add_order/pending_order/wx_pay_code/index',
      ],
    },
    {
      root: 'pages/product',
      pages: ['list/index', 'addGoods/index'],
    },
    {
      root: 'pages/hotGoods',
      pages: ['index/index', 'hot_list/index'],
    },
    {
      root: 'pages/mer',
      pages: ['mer_detail/index'],
    },
    {
      root: 'pages/marketing',
      pages: ['sign/index'],
    },
    {
      root: 'pages/search',
      pages: ['index'],
    },
  ],
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'black',
  },
  tabBar: {
    color: '#666666',
    selectedColor: '#ff0000',
    backgroundColor: '#ffffff',
    borderStyle: 'white',
    list: [
      {
        pagePath: 'pages/index/index',
        iconPath: 'static/tabbar/1-0.png',
        selectedIconPath: 'static/tabbar/1-1.png',
        text: '首页',
      },
      {
        pagePath: 'pages/game/gamehome/index',
        iconPath: 'static/tabbar/2-0.png',
        selectedIconPath: 'static/tabbar/2-1.png',
        text: '游戏',
      },
      {
        pagePath: 'pages/cart/index',
        iconPath: 'static/tabbar/3-0.png',
        selectedIconPath: 'static/tabbar/3-1.png',
        text: '购物车',
      },
      {
        pagePath: 'pages/user/index',
        iconPath: 'static/tabbar/4-0.png',
        selectedIconPath: 'static/tabbar/4-1.png',
        text: '我的',
      },
    ],
  },
  permission: {
    'scope.userLocation': {
      desc: '你的位置信息将用于小程序位置接口的效果展示',
    },
  },
  requiredBackgroundModes: ['audio', 'location'],
  // @ts-ignore
  requiredPrivateInfos: ['getLocation'],
  lazyCodeLoading: 'requiredComponents',
});
