import { MINI_PROGRAM_USER_CONFIG } from "@/config";


const tabBarItems = Object.values(MINI_PROGRAM_USER_CONFIG).map(item => item.tabBarList).flat()

export default defineAppConfig({
  pages: [
    'pages/login/login',
    'pages/register/register',
    ...tabBarItems.map(i => i.pagePath)
  ],
  subPackages: [
    {
      root: "subPages/projectManager",
      pages: [
        'myProject/myProject',
        'myProject/projectDetails/projectDetails',
        'securityUserForm/securityUserForm',
      ]
    },
    {
      root: "subPages/police",
      pages: [
        'dailyInspection/dailyInspection',
        'myEnterprisesUnit/myEnterprisesUnit',
        'myEnterprisesUnit/projectDetails/projectDetails'
      ]
    },
    {
      root: "subPages/select",
      pages: [
        'dailyLife/dailyLife',
        'signature/signature'
      ]
    },
  ],

  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#4e87ff',
    navigationBarTitleText: '',
    navigationBarTextStyle: 'white',
  },
  tabBar: {
    custom: true,
    list: tabBarItems
  }
})
