// 组件映射表：后端菜单返回的 component 路径需与此处 key 一致（不含 .vue）
import HomeIndex from '../views/home/index.vue'
import TestPage from '../views/test/test.vue'
import SubscriptionUsers from '../views/subscription/users.vue'
import SubscriptionPlans from '../views/subscription/plans.vue'
import SubscriptionRecords from '../views/subscription/subscriptions.vue'
import SubscriptionTokens from '../views/subscription/tokens.vue'
import SubscriptionPayment from '../views/subscription/payment.vue'
import SubscriptionUsage from '../views/subscription/usage.vue'
import SubscriptionAuditLog from '../views/subscription/audit_log.vue'

const componentMap = {
  // 与 sys_menu.component 一致：库中常见为 home/index 或 home/index.vue
  'home/index': HomeIndex,
  'home/index.vue': HomeIndex,
  'test/test': TestPage,
  'subscription/dashboard': HomeIndex,
  'subscription/user': SubscriptionUsers,
  'subscription/plan': SubscriptionPlans,
  'subscription/subscription': SubscriptionRecords,
  'subscription/token': SubscriptionTokens,
  'subscription/payment': SubscriptionPayment,
  'subscription/usage': SubscriptionUsage,
  'subscription/audit': SubscriptionAuditLog,
}

export default componentMap;
