/**
 * Admin 页面组件映射表
 * 
 * 用于内部路由系统的组件解析
 * key: componentKey (来自 adminRoutes.uts)
 * value: 组件引用
 * 
 * 注意: 
 * 1. 组件已切换为 静态导入 (Static Import)，以解决 H5 环境下的加载异常 (net::ERR_CACHE_READ_FAILURE)
 * 2. 组件路径使用 @ 别名
 * 3. 占位组件统一使用 PlaceholderPage
 */

// 导入占位组件
import PlaceholderPage from '@/layouts/admin/components/PlaceholderPage.uvue'

// 导入首页（内部组件，不包含 AdminLayout）
import HomeIndex from '@/layouts/admin/pages/HomeIndex.uvue'
import UserCenter from '@/pages/mall/admin/userCenter/index.uvue'

// --- 店铺模块 ---
import ShopManage from '@/pages/mall/admin/shop/manage.uvue'
import ShopCreate from '@/pages/mall/admin/shop/create.uvue'
import ShopAdminList from '@/pages/mall/admin/shop/shop-manage.uvue'

// --- 用户模块 ---
import UserStatistic from '@/pages/mall/admin/user/statistics/index.uvue'
import UserList from '@/pages/mall/admin/user/management/index.uvue'
import UserLevel from '@/pages/mall/admin/user/level/index.uvue'
import UserGroup from '@/pages/mall/admin/user/grouping/index.uvue'
import UserLabel from '@/pages/mall/admin/user/label/index.uvue'
import UserMemberConfig from '@/pages/mall/admin/user/config/index.uvue'

// --- 商品模块 ---
import ProductStatistic from '@/pages/mall/admin/product/product-statistics/index.uvue'
import ProductList from '@/pages/mall/admin/product/product-management/index.uvue'
import ProductEdit from '@/pages/mall/admin/product/product-management/components/edit.uvue'
import ProductMemberPrice from '@/pages/mall/admin/product/product-management/components/member-price.uvue'
import ProductClassify from '@/pages/mall/admin/product/classification/index.uvue'
import ProductReply from '@/pages/mall/admin/product/reviews/index.uvue'
import ProductAttr from '@/pages/mall/admin/product/specifications/index.uvue'
import ProductParam from '@/pages/mall/admin/product/parameters/index.uvue'
import ProductLabel from '@/pages/mall/admin/product/labels/index.uvue'
import ProductProtection from '@/pages/mall/admin/product/protection/index.uvue'

// --- 订单模块 ---
import OrderList from '@/pages/mall/admin/order/order-management/index.uvue'
import OrderStatistic from '@/pages/mall/admin/order/order-statistics/index.uvue'
import OrderRefund from '@/pages/mall/admin/order/aftersales-order/index.uvue'
import OrderCashier from '@/pages/mall/admin/order/cashier-order/index.uvue'
import OrderVerify from '@/pages/mall/admin/order/write-off-records/index.uvue'
import OrderConfig from '@/pages/mall/admin/order/order-configuration/index.uvue'

// --- 营销模块 ---
import MarketingCouponList from '@/pages/mall/admin/marketing/coupon/coupon-list/index.uvue'
import MarketingCouponUser from '@/pages/mall/admin/marketing/coupon/claim-record/index.uvue'
import MarketingIntegralStatistic from '@/pages/mall/admin/marketing/points/statistics/index.uvue'
import MarketingIntegralProduct from '@/pages/mall/admin/marketing/points/products/index.uvue'
import MarketingIntegralOrder from '@/pages/mall/admin/marketing/points/orders/index.uvue'
import MarketingIntegralRecord from '@/pages/mall/admin/marketing/points/record/index.uvue'
import MarketingIntegralConfig from '@/pages/mall/admin/marketing/points/config/index.uvue'
import MarketingLotteryList from '@/pages/mall/admin/marketing/lottery/list/index.uvue'
import MarketingLotteryConfig from '@/pages/mall/admin/marketing/lottery/configuration/index.uvue'
import MarketingBargainProduct from '@/pages/mall/admin/marketing/bargain/products/index.uvue'
import MarketingBargainList from '@/pages/mall/admin/marketing/bargain/list/index.uvue'
import MarketingCombinationProduct from '@/pages/mall/admin/marketing/combination/products/index.uvue'
import MarketingCombinationList from '@/pages/mall/admin/marketing/combination/list/index.uvue'
import MarketingCombinationCreate from '@/pages/mall/admin/marketing/combination/index.uvue'
import MarketingSeckillList from '@/pages/mall/admin/marketing/seckill/list/index.uvue'
import MarketingSeckillProduct from '@/pages/mall/admin/marketing/seckill/products/index.uvue'
import MarketingSeckillConfig from '@/pages/mall/admin/marketing/seckill/config/index.uvue'
import MarketingMemberType from '@/pages/mall/admin/marketing/member/type/index.uvue'
import MarketingMemberRight from '@/pages/mall/admin/marketing/member/right/index.uvue'
import MarketingMemberCard from '@/pages/mall/admin/marketing/member/kami-membership/index.uvue'
import MarketingMemberRecord from '@/pages/mall/admin/marketing/member/record/index.uvue'
import MarketingMemberConfig from '@/pages/mall/admin/marketing/member/config/index.uvue'
import MarketingLiveRoom from '@/pages/mall/admin/marketing/live/live-management/index.uvue'
import MarketingLiveProduct from '@/pages/mall/admin/marketing/live/products-management/index.uvue'
import MarketingLiveAnchor from '@/pages/mall/admin/marketing/live/streamer-management/index.uvue'
import MarketingRechargeQuota from '@/pages/mall/admin/marketing/recharge/amount-setting/index.uvue'
import MarketingRechargeConfig from '@/pages/mall/admin/marketing/recharge/config/index.uvue'
import MarketingCheckinConfig from '@/pages/mall/admin/marketing/checkin/config/index.uvue'
import MarketingCheckinReward from '@/pages/mall/admin/marketing/checkin/reward/index.uvue'
import MarketingNewcomerGift from '@/pages/mall/admin/marketing/newcomer/index.uvue'
import MarketingStatisticIndex from '@/pages/mall/admin/marketing/marketing-statistics/index.uvue'

// --- 内容模块 ---
import CmsArticle from '@/pages/mall/admin/cms/article/index.uvue'
import CmsCategory from '@/pages/mall/admin/cms/category/index.uvue'

// --- 财务模块 ---
import FinanceTransactionStats from '@/pages/mall/admin/finance/transaction-statistics/index.uvue'
import FinanceWithdrawal from '@/pages/mall/admin/finance/finance-operations/request/index.uvue'
import FinanceInvoice from '@/pages/mall/admin/finance/finance-operations/management/index.uvue'
import FinanceRecharge from '@/pages/mall/admin/finance/finance-record/recharge-record/index.uvue'
import FinanceCapitalFlow from '@/pages/mall/admin/finance/finance-record/flow/index.uvue'
import FinanceBill from '@/pages/mall/admin/finance/finance-record/billing-record/index.uvue'
import FinanceCommission from '@/pages/mall/admin/finance/commission-record/index.uvue'
import FinanceBalanceStats from '@/pages/mall/admin/finance/balance-record/statistics/index.uvue'
import FinanceBalanceRecord from '@/pages/mall/admin/finance/balance-record/record/index.uvue'

// --- 设置模块 ---
import SettingSystemConfig from '@/pages/mall/admin/setting/system/index.uvue'
import SettingMessageIndex from '@/pages/mall/admin/setting/message/index.uvue'
import SettingProtocolIndex from '@/pages/mall/admin/setting/agreement/index.uvue'
import SettingTicketIndex from '@/pages/mall/admin/setting/receipt/index.uvue'
import SettingAuthRole from '@/pages/mall/admin/setting/auth/role-management/index.uvue'
import SettingAuthAdmin from '@/pages/mall/admin/setting/auth/admin-management/index.uvue'
import SettingAuthPermission from '@/pages/mall/admin/setting/auth/menu-management/index.uvue'
import SettingDeliveryStaff from '@/pages/mall/admin/setting/delivery/management/index.uvue'
import SettingDeliveryStation from '@/pages/mall/admin/setting/delivery/setting/station/index.uvue'
import SettingDeliveryVerifier from '@/pages/mall/admin/setting/delivery/setting/verifier/index.uvue'
import SettingDeliveryTemplate from '@/pages/mall/admin/setting/delivery/setting/template/index.uvue'
import SettingInterfaceOnepassConfig from '@/pages/mall/admin/setting/interface/onepass/config/index.uvue'
import SettingInterfaceOnepassIndex from '@/pages/mall/admin/setting/interface/onepass/index.uvue'
import SettingInterfaceStorage from '@/pages/mall/admin/setting/interface/storage/index.uvue'
import SettingInterfaceCollect from '@/pages/mall/admin/setting/interface/collect/index.uvue'
import SettingInterfaceLogistics from '@/pages/mall/admin/setting/interface/logistics/index.uvue'
import SettingInterfaceESheet from '@/pages/mall/admin/setting/interface/e-sheet/index.uvue'
import SettingInterfaceSms from '@/pages/mall/admin/setting/interface/sms/index.uvue'
import SettingInterfacePayment from '@/pages/mall/admin/setting/interface/payment/index.uvue'

// --- 分销模块 ---
import DistributionPromoter from '@/pages/mall/admin/distribution/distributor-management/index.uvue'
import DistributionLevel from '@/pages/mall/admin/distribution/level/index.uvue'
import DistributionSetting from '@/pages/mall/admin/distribution/setting/index.uvue'
import DivisionList from '@/pages/mall/admin/distribution/business-division/business-division-list/index.uvue'
import DivisionAgent from '@/pages/mall/admin/distribution/business-division/agent-list/index.uvue'
import DivisionApply from '@/pages/mall/admin/distribution/business-division/agent-application/index.uvue'

// --- 客服模块 ---
import KefuList from '@/pages/mall/admin/kefu/list/index.uvue'
import KefuWords from '@/pages/mall/admin/kefu/rhetoric/index.uvue'
import KefuFeedback from '@/pages/mall/admin/kefu/user-message/index.uvue'
import KefuAutoReply from '@/pages/mall/admin/kefu/auto-reply/index.uvue'
import KefuConfig from '@/pages/mall/admin/kefu/config/index.uvue'

// --- 装修模块 ---
import DecorationHome from '@/pages/mall/admin/decoration/homepage-decoration/index.uvue'
import DecorationCategory from '@/pages/mall/admin/decoration/product-category/index.uvue'
import DecorationUser from '@/pages/mall/admin/decoration/personal-center/index.uvue'
import DecorationData from '@/pages/mall/admin/decoration/data-config/index.uvue'
import DecorationStyle from '@/pages/mall/admin/decoration/theme-style/index.uvue'
import DecorationMaterial from '@/pages/mall/admin/decoration/material-management/index.uvue'
import DecorationLink from '@/pages/mall/admin/decoration/link-management/index.uvue'

// --- 应用模块 ---
import AppWechatMenu from '@/pages/mall/admin/app/wechat/menu/index.uvue'
import AppWechatNews from '@/pages/mall/admin/app/wechat/management/index.uvue'
import AppWechatReplyFollow from '@/pages/mall/admin/app/wechat/reply/follow/index.uvue'
import AppWechatReplyKeyword from '@/pages/mall/admin/app/wechat/reply/keyword/index.uvue'
import AppWechatReplyInvalid from '@/pages/mall/admin/app/wechat/reply/invalid/index.uvue'
import AppWechatConfig from '@/pages/mall/admin/app/wechat/config/index.uvue'
import AppRoutineDownload from '@/pages/mall/admin/app/routine/download/index.uvue'
import AppRoutineConfig from '@/pages/mall/admin/app/routine/config/index.uvue'
import AppMobileConfig from '@/pages/mall/admin/app/mobile/config/index.uvue'
import AppMobileVersion from '@/pages/mall/admin/app/mobile/version/index.uvue'
import AppPcDesign from '@/pages/mall/admin/app/pc/design/index.uvue'
import AppPcConfig from '@/pages/mall/admin/app/pc/config/index.uvue'

// --- 维护模块 ---
import MaintainDevConfig from '@/pages/mall/admin/maintain/dev-config/category/index.uvue'
import MaintainDevData from '@/pages/mall/admin/maintain/dev-config/combination-data/index.uvue'
import MaintainDevTask from '@/pages/mall/admin/maintain/dev-config/cron-job/index.uvue'
import MaintainDevAuth from '@/pages/mall/admin/maintain/dev-config/permission/index.uvue'
import MaintainDevModule from '@/pages/mall/admin/maintain/dev-config/module-config/index.uvue'
import MaintainDevEvent from '@/pages/mall/admin/maintain/dev-config/custom-event/index.uvue'
import MaintainSecurityCache from '@/pages/mall/admin/maintain/security/refresh-cache/index.uvue'
import MaintainSecurityLog from '@/pages/mall/admin/maintain/security/system-log/index.uvue'
import MaintainSecurityUpgrade from '@/pages/mall/admin/maintain/security/online-upgrade/index.uvue'
import MaintainDataLogistics from '@/pages/mall/admin/maintain/data/logistics/index.uvue'
import MaintainDataCity from '@/pages/mall/admin/maintain/data/city-data/index.uvue'
import MaintainDataClear from '@/pages/mall/admin/maintain/data/clear/index.uvue'
import MaintainApiAccount from '@/pages/mall/admin/maintain/api/account/index.uvue'
import MaintainLangList from '@/pages/mall/admin/maintain/lang/list/index.uvue'
import MaintainLangDetail from '@/pages/mall/admin/maintain/lang/detail/index.uvue'
import MaintainLangRegion from '@/pages/mall/admin/maintain/lang/region/index.uvue'
import MaintainLangConfig from '@/pages/mall/admin/maintain/lang/config/index.uvue'
import MaintainToolDb from '@/pages/mall/admin/maintain/dev-tools/database/index.uvue'
import MaintainToolFile from '@/pages/mall/admin/maintain/dev-tools/file/index.uvue'
import MaintainToolApi from '@/pages/mall/admin/maintain/dev-tools/interface/index.uvue'
import MaintainToolDic from '@/pages/mall/admin/maintain/dev-tools/data-dictionary/index.uvue'
import MaintainSysInfo from '@/pages/mall/admin/maintain/sys/info/index.uvue'

/**
 * 组件映射表
 */
export const componentMap: Map<string, any> = new Map([
  // 首页
  ['HomeIndex', HomeIndex],
  ['UserCenter', UserCenter],

  // 店铺模块
  ['ShopManage', ShopManage],
  ['ShopCreate', ShopCreate],
  ['ShopAdminList', ShopAdminList],

  // 用户模块
  ['UserStatistic', UserStatistic],
  ['UserList', UserList],
  ['UserLevel', UserLevel],
  ['UserGroup', UserGroup],
  ['UserLabel', UserLabel],
  ['UserMemberConfig', UserMemberConfig],
  
  // 商品模块
  ['ProductStatistic', ProductStatistic],
  ['ProductList', ProductList],
  ['ProductEdit', ProductEdit],
  ['ProductMemberPrice', ProductMemberPrice],
  ['ProductClassify', ProductClassify],
  ['ProductReply', ProductReply],
  ['ProductAttr', ProductAttr],
  ['ProductParam', ProductParam],
  ['ProductLabel', ProductLabel],
  ['ProductProtection', ProductProtection],
  
  // 订单模块
  ['OrderList', OrderList],
  ['OrderStatistic', OrderStatistic],
  ['OrderRefund', OrderRefund],
  ['OrderCashier', OrderCashier],
  ['OrderVerify', OrderVerify],
  ['OrderConfig', OrderConfig],
  
  // 营销模块
  ['MarketingCouponList', MarketingCouponList],
  ['MarketingCouponUser', MarketingCouponUser],
  ['MarketingIntegralStatistic', MarketingIntegralStatistic],
  ['MarketingIntegralProduct', MarketingIntegralProduct],
  ['MarketingIntegralOrder', MarketingIntegralOrder],
  ['MarketingIntegralRecord', MarketingIntegralRecord],
  ['MarketingIntegralConfig', MarketingIntegralConfig],
  ['MarketingLotteryList', MarketingLotteryList],
  ['MarketingLotteryConfig', MarketingLotteryConfig],
  ['MarketingBargainProduct', MarketingBargainProduct],
  ['MarketingBargainList', MarketingBargainList],
  ['MarketingCombinationProduct', MarketingCombinationProduct],
  ['MarketingCombinationList', MarketingCombinationList],
  ['MarketingCombinationCreate', MarketingCombinationCreate],
  ['MarketingSeckillList', MarketingSeckillList],
  ['MarketingSeckillProduct', MarketingSeckillProduct],
  ['MarketingSeckillConfig', MarketingSeckillConfig],
  ['MarketingMemberType', MarketingMemberType],
  ['MarketingMemberRight', MarketingMemberRight],
  ['MarketingMemberCard', MarketingMemberCard],
  ['MarketingMemberRecord', MarketingMemberRecord],
  ['MarketingMemberConfig', MarketingMemberConfig],
  ['MarketingLiveRoom', MarketingLiveRoom],
  ['MarketingLiveProduct', MarketingLiveProduct],
  ['MarketingLiveAnchor', MarketingLiveAnchor],
  ['MarketingRechargeQuota', MarketingRechargeQuota],
  ['MarketingRechargeConfig', MarketingRechargeConfig],
  ['MarketingCheckinConfig', MarketingCheckinConfig],
  ['MarketingCheckinReward', MarketingCheckinReward],
  ['MarketingChannelList', PlaceholderPage],
  ['MarketingNewcomerGift', MarketingNewcomerGift],
  ['MarketingStatisticIndex', MarketingStatisticIndex],
  
  // 内容模块
  ['CmsArticle', CmsArticle],
  ['CmsCategory', CmsCategory],
  
  // 财务模块
  ['FinanceTransactionStats', FinanceTransactionStats],
  ['FinanceWithdrawal', FinanceWithdrawal],
  ['FinanceInvoice', FinanceInvoice],
  ['FinanceRecharge', FinanceRecharge],
  ['FinanceCapitalFlow', FinanceCapitalFlow],
  ['FinanceBill', FinanceBill],
  ['FinanceCommission', FinanceCommission],
  ['FinanceBalanceStats', FinanceBalanceStats],
  ['FinanceBalanceRecord', FinanceBalanceRecord],
  
  // 数据模块
  ['StatisticIndex', PlaceholderPage],
  
  // 设置模块
  ['SettingSystemConfig', SettingSystemConfig],
  ['SettingMessageIndex', SettingMessageIndex],
  ['SettingProtocolIndex', SettingProtocolIndex],
  ['SettingTicketIndex', SettingTicketIndex],
  ['SettingAuthRole', SettingAuthRole],
  ['SettingAuthAdmin', SettingAuthAdmin],
  ['SettingAuthPermission', SettingAuthPermission],
  ['SettingDeliveryStaff', SettingDeliveryStaff],
  ['SettingDeliveryStation', SettingDeliveryStation],
  ['SettingDeliveryVerifier', SettingDeliveryVerifier],
  ['SettingDeliveryTemplate', SettingDeliveryTemplate],
  ['SettingInterfaceOnepassConfig', SettingInterfaceOnepassConfig],
  ['SettingInterfaceOnepassIndex', SettingInterfaceOnepassIndex],
  ['SettingInterfaceStorage', SettingInterfaceStorage],
  ['SettingInterfaceCollect', SettingInterfaceCollect],
  ['SettingInterfaceLogistics', SettingInterfaceLogistics],
  ['SettingInterfaceESheet', SettingInterfaceESheet],
  ['SettingInterfaceSms', SettingInterfaceSms],
  ['SettingInterfacePayment', SettingInterfacePayment],
  
  // 分销模块
  ['DistributionStatistic', PlaceholderPage],
  ['DistributionPromoter', DistributionPromoter],
  ['DistributionLevel', DistributionLevel],
  ['DistributionSetting', DistributionSetting],
  ['DivisionList', DivisionList],
  ['DivisionAgent', DivisionAgent],
  ['DivisionApply', DivisionApply],

  // 客服模块
  ['KefuList', KefuList],
  ['KefuWords', KefuWords],
  ['KefuFeedback', KefuFeedback],
  ['KefuAutoReply', KefuAutoReply],
  ['KefuConfig', KefuConfig],

  // 装修模块
  ['DecorationHome', DecorationHome],
  ['DecorationCategory', DecorationCategory],
  ['DecorationUser', DecorationUser],
  ['DecorationData', DecorationData],
  ['DecorationStyle', DecorationStyle],
  ['DecorationMaterial', DecorationMaterial],
  ['DecorationLink', DecorationLink],

  // 应用模块
  ['AppWechatMenu', AppWechatMenu],
  ['AppWechatNews', AppWechatNews],
  ['AppWechatReplyFollow', AppWechatReplyFollow],
  ['AppWechatReplyKeyword', AppWechatReplyKeyword],
  ['AppWechatReplyInvalid', AppWechatReplyInvalid],
  ['AppWechatConfig', AppWechatConfig],
  ['AppRoutineDownload', AppRoutineDownload],
  ['AppRoutineConfig', AppRoutineConfig],
  ['AppMobileConfig', AppMobileConfig],
  ['AppMobileVersion', AppMobileVersion],
  ['AppPcDesign', AppPcDesign],
  ['AppPcConfig', AppPcConfig],

  // 维护模块
  ['MaintainDevConfig', MaintainDevConfig],
  ['MaintainDevData', MaintainDevData],
  ['MaintainDevTask', MaintainDevTask],
  ['MaintainDevAuth', MaintainDevAuth],
  ['MaintainDevModule', MaintainDevModule],
  ['MaintainDevEvent', MaintainDevEvent],
  ['MaintainSecurityCache', MaintainSecurityCache],
  ['MaintainSecurityLog', MaintainSecurityLog],
  ['MaintainSecurityUpgrade', MaintainSecurityUpgrade],
  ['MaintainDataLogistics', MaintainDataLogistics],
  ['MaintainDataCity', MaintainDataCity],
  ['MaintainDataClear', MaintainDataClear],
  ['MaintainApiAccount', MaintainApiAccount],
  ['MaintainLangList', MaintainLangList],
  ['MaintainLangDetail', MaintainLangDetail],
  ['MaintainLangRegion', MaintainLangRegion],
  ['MaintainLangConfig', MaintainLangConfig],
  ['MaintainToolDb', MaintainToolDb],
  ['MaintainToolFile', MaintainToolFile],
  ['MaintainToolApi', MaintainToolApi],
  ['MaintainToolDic', MaintainToolDic],
  ['MaintainSysInfo', MaintainSysInfo]
])

/**
 * 获取组件
 * @param componentKey 组件Key
 * @returns 组件引用,不存在时返回占位组件
 */
export function getComponent(componentKey: string): any {
  return componentMap.get(componentKey) || PlaceholderPage
}
