import type { AppRouteRecord } from '@/types/router'

/**
 * 门店管理路由模块
 */
const storeRoutes: AppRouteRecord[] = [
  {
    path: '/platform',
    name: 'Platform',
    component: '/index/index',
    redirect: '/platform/store-audits',
    meta: {
      title: 'menus.platform.title',
      icon: 'ri:shield-star-line',
      permission: ['store-audit:read', 'store-qualification:read']
    },
    children: [
      {
        path: 'store-audits',
        name: 'PlatformStoreAudits',
        component: '/platform/store-audits',
        meta: {
          title: 'menus.platform.storeAudits',
          icon: 'ri:checkbox-multiple-line',
          permission: ['store-audit:read'],
          authList: [
            { title: '审核通过', authMark: 'store-audit:approve' },
            { title: '审核驳回', authMark: 'store-audit:reject' },
            { title: '强制关闭/解除', authMark: 'store-audit:force-close' }
          ]
        }
      },
      {
        path: 'qualification-alerts',
        name: 'PlatformQualificationAlerts',
        component: '/platform/qualification-alerts',
        meta: {
          title: 'menus.platform.qualificationAlerts',
          icon: 'ri:alarm-warning-line',
          permission: ['store-qualification:read']
        }
      }
    ]
  }
]

export default storeRoutes
