import { markRaw, type Component } from 'vue'
import {
  HomeOutline,
  SettingsOutline,
  PersonOutline,
  PeopleOutline,
  KeyOutline,
  ShieldOutline,
  DocumentOutline,
  FolderOutline,
  FolderOpenOutline,
  GridOutline,
  AppsOutline,
  ListOutline,
  MenuOutline,
  SearchOutline,
  AddOutline,
  CreateOutline,
  TrashOutline,
  CloudUploadOutline,
  CloudDownloadOutline,
  ImageOutline,
  CameraOutline,
  VideocamOutline,
  MusicalNotesOutline,
  DocumentTextOutline,
  NewspaperOutline,
  BookOutline,
  BookmarkOutline,
  CalendarOutline,
  TimeOutline,
  AlarmOutline,
  NotificationsOutline,
  ChatbubbleOutline,
  ChatbubblesOutline,
  MailOutline,
  SendOutline,
  ShareOutline,
  LinkOutline,
  GlobeOutline,
  MapOutline,
  LocationOutline,
  CompassOutline,
  NavigateOutline,
  CarOutline,
  AirplaneOutline,
  BoatOutline,
  BicycleOutline,
  WalkOutline,
  FitnessOutline,
  HeartOutline,
  StarOutline,
  TrophyOutline,
  FlagOutline,
  PricetagOutline,
  CartOutline,
  BagOutline,
  WalletOutline,
  CardOutline,
  CashOutline,
  StatsChartOutline,
  BarChartOutline,
  PieChartOutline,
  TrendingUpOutline,
  TrendingDownOutline,
  PulseOutline,
  AnalyticsOutline,
  SpeedometerOutline,
  ServerOutline,
  HardwareChipOutline,
  DesktopOutline,
  LaptopOutline,
  PhonePortraitOutline,
  TabletPortraitOutline,
  WatchOutline,
  TvOutline,
  PrintOutline,
  ScanOutline,
  QrCodeOutline,
  BarcodeOutline,
  WifiOutline,
  BluetoothOutline,
  CloudOutline,
  SunnyOutline,
  MoonOutline,
  ThunderstormOutline,
  RainyOutline,
  SnowOutline,
  ColorPaletteOutline,
  BrushOutline,
  BuildOutline,
  HammerOutline,
  ConstructOutline,
  CogOutline,
  OptionsOutline,
  ToggleOutline,
  LockClosedOutline,
  LockOpenOutline,
  EyeOutline,
  EyeOffOutline,
  HelpOutline,
  HelpCircleOutline,
  InformationCircleOutline,
  AlertCircleOutline,
  WarningOutline,
  CheckmarkCircleOutline,
  CloseCircleOutline,
  AddCircleOutline,
  RemoveCircleOutline,
  RefreshOutline,
  ReloadOutline,
  SyncOutline,
  DownloadOutline,
  LogInOutline,
  LogOutOutline,
  EnterOutline,
  ExitOutline,
  ExpandOutline,
  ContractOutline,
  ChevronUpOutline,
  ChevronDownOutline,
  ChevronBackOutline,
  ChevronForwardOutline,
  ArrowUpOutline,
  ArrowDownOutline,
  ArrowBackOutline,
  ArrowForwardOutline,
  SwapHorizontalOutline,
  SwapVerticalOutline,
  CopyOutline,
  ClipboardOutline,
  CutOutline,
  SaveOutline,
  CodeOutline,
  CodeSlashOutline,
  TerminalOutline,
  GitBranchOutline,
  GitCommitOutline,
  GitMergeOutline,
  GitPullRequestOutline,
  BugOutline,
  FlaskOutline,
  RocketOutline,
  FlashOutline,
  BulbOutline,
  ExtensionPuzzleOutline,
  LayersOutline,
  CubeOutline,
  ShapesOutline,
  EllipseOutline,
  SquareOutline,
  TriangleOutline,
  BusinessOutline,
  StorefrontOutline,
  SchoolOutline,
  LibraryOutline,
  MedkitOutline,
  RestaurantOutline,
  CafeOutline,
  BeerOutline,
  WineOutline,
  PizzaOutline,
  FastFoodOutline,
  IceCreamOutline,
  LeafOutline,
  FlowerOutline,
  PawOutline,
  FingerPrintOutline,
  HandLeftOutline,
  HandRightOutline,
  ThumbsUpOutline,
  ThumbsDownOutline,
  HappyOutline,
  SadOutline,
  AccessibilityOutline,
  BodyOutline,
  ManOutline,
  WomanOutline,
  MaleOutline,
  FemaleOutline,
  TransgenderOutline,
  PlanetOutline,
  EarthOutline,
  CloseOutline,
  EllipsisHorizontalOutline,
  EllipsisVerticalOutline,
  ReorderFourOutline,
  ReorderThreeOutline,
  ReorderTwoOutline
} from '@vicons/ionicons5'

// 图标映射表
export const iconMap: Record<string, Component> = {
  HomeOutline: markRaw(HomeOutline),
  SettingsOutline: markRaw(SettingsOutline),
  PersonOutline: markRaw(PersonOutline),
  PeopleOutline: markRaw(PeopleOutline),
  KeyOutline: markRaw(KeyOutline),
  ShieldOutline: markRaw(ShieldOutline),
  DocumentOutline: markRaw(DocumentOutline),
  FolderOutline: markRaw(FolderOutline),
  FolderOpenOutline: markRaw(FolderOpenOutline),
  GridOutline: markRaw(GridOutline),
  AppsOutline: markRaw(AppsOutline),
  ListOutline: markRaw(ListOutline),
  MenuOutline: markRaw(MenuOutline),
  SearchOutline: markRaw(SearchOutline),
  AddOutline: markRaw(AddOutline),
  CreateOutline: markRaw(CreateOutline),
  TrashOutline: markRaw(TrashOutline),
  CloudUploadOutline: markRaw(CloudUploadOutline),
  CloudDownloadOutline: markRaw(CloudDownloadOutline),
  ImageOutline: markRaw(ImageOutline),
  CameraOutline: markRaw(CameraOutline),
  VideocamOutline: markRaw(VideocamOutline),
  MusicalNotesOutline: markRaw(MusicalNotesOutline),
  DocumentTextOutline: markRaw(DocumentTextOutline),
  NewspaperOutline: markRaw(NewspaperOutline),
  BookOutline: markRaw(BookOutline),
  BookmarkOutline: markRaw(BookmarkOutline),
  CalendarOutline: markRaw(CalendarOutline),
  TimeOutline: markRaw(TimeOutline),
  AlarmOutline: markRaw(AlarmOutline),
  NotificationsOutline: markRaw(NotificationsOutline),
  ChatbubbleOutline: markRaw(ChatbubbleOutline),
  ChatbubblesOutline: markRaw(ChatbubblesOutline),
  MailOutline: markRaw(MailOutline),
  SendOutline: markRaw(SendOutline),
  ShareOutline: markRaw(ShareOutline),
  LinkOutline: markRaw(LinkOutline),
  GlobeOutline: markRaw(GlobeOutline),
  MapOutline: markRaw(MapOutline),
  LocationOutline: markRaw(LocationOutline),
  CompassOutline: markRaw(CompassOutline),
  NavigateOutline: markRaw(NavigateOutline),
  CarOutline: markRaw(CarOutline),
  AirplaneOutline: markRaw(AirplaneOutline),
  BoatOutline: markRaw(BoatOutline),
  BicycleOutline: markRaw(BicycleOutline),
  WalkOutline: markRaw(WalkOutline),
  FitnessOutline: markRaw(FitnessOutline),
  HeartOutline: markRaw(HeartOutline),
  StarOutline: markRaw(StarOutline),
  TrophyOutline: markRaw(TrophyOutline),
  FlagOutline: markRaw(FlagOutline),
  PricetagOutline: markRaw(PricetagOutline),
  CartOutline: markRaw(CartOutline),
  BagOutline: markRaw(BagOutline),
  WalletOutline: markRaw(WalletOutline),
  CardOutline: markRaw(CardOutline),
  CashOutline: markRaw(CashOutline),
  StatsChartOutline: markRaw(StatsChartOutline),
  BarChartOutline: markRaw(BarChartOutline),
  PieChartOutline: markRaw(PieChartOutline),
  TrendingUpOutline: markRaw(TrendingUpOutline),
  TrendingDownOutline: markRaw(TrendingDownOutline),
  PulseOutline: markRaw(PulseOutline),
  AnalyticsOutline: markRaw(AnalyticsOutline),
  SpeedometerOutline: markRaw(SpeedometerOutline),
  ServerOutline: markRaw(ServerOutline),
  HardwareChipOutline: markRaw(HardwareChipOutline),
  DesktopOutline: markRaw(DesktopOutline),
  LaptopOutline: markRaw(LaptopOutline),
  PhonePortraitOutline: markRaw(PhonePortraitOutline),
  TabletPortraitOutline: markRaw(TabletPortraitOutline),
  WatchOutline: markRaw(WatchOutline),
  TvOutline: markRaw(TvOutline),
  PrintOutline: markRaw(PrintOutline),
  ScanOutline: markRaw(ScanOutline),
  QrCodeOutline: markRaw(QrCodeOutline),
  BarcodeOutline: markRaw(BarcodeOutline),
  WifiOutline: markRaw(WifiOutline),
  BluetoothOutline: markRaw(BluetoothOutline),
  CloudOutline: markRaw(CloudOutline),
  SunnyOutline: markRaw(SunnyOutline),
  MoonOutline: markRaw(MoonOutline),
  ThunderstormOutline: markRaw(ThunderstormOutline),
  RainyOutline: markRaw(RainyOutline),
  SnowOutline: markRaw(SnowOutline),
  ColorPaletteOutline: markRaw(ColorPaletteOutline),
  BrushOutline: markRaw(BrushOutline),
  BuildOutline: markRaw(BuildOutline),
  HammerOutline: markRaw(HammerOutline),
  ConstructOutline: markRaw(ConstructOutline),
  CogOutline: markRaw(CogOutline),
  OptionsOutline: markRaw(OptionsOutline),
  ToggleOutline: markRaw(ToggleOutline),
  LockClosedOutline: markRaw(LockClosedOutline),
  LockOpenOutline: markRaw(LockOpenOutline),
  EyeOutline: markRaw(EyeOutline),
  EyeOffOutline: markRaw(EyeOffOutline),
  HelpOutline: markRaw(HelpOutline),
  HelpCircleOutline: markRaw(HelpCircleOutline),
  InformationCircleOutline: markRaw(InformationCircleOutline),
  AlertCircleOutline: markRaw(AlertCircleOutline),
  WarningOutline: markRaw(WarningOutline),
  CheckmarkCircleOutline: markRaw(CheckmarkCircleOutline),
  CloseCircleOutline: markRaw(CloseCircleOutline),
  AddCircleOutline: markRaw(AddCircleOutline),
  RemoveCircleOutline: markRaw(RemoveCircleOutline),
  RefreshOutline: markRaw(RefreshOutline),
  ReloadOutline: markRaw(ReloadOutline),
  SyncOutline: markRaw(SyncOutline),
  DownloadOutline: markRaw(DownloadOutline),
  LogInOutline: markRaw(LogInOutline),
  LogOutOutline: markRaw(LogOutOutline),
  EnterOutline: markRaw(EnterOutline),
  ExitOutline: markRaw(ExitOutline),
  ExpandOutline: markRaw(ExpandOutline),
  ContractOutline: markRaw(ContractOutline),
  ChevronUpOutline: markRaw(ChevronUpOutline),
  ChevronDownOutline: markRaw(ChevronDownOutline),
  ChevronBackOutline: markRaw(ChevronBackOutline),
  ChevronForwardOutline: markRaw(ChevronForwardOutline),
  ArrowUpOutline: markRaw(ArrowUpOutline),
  ArrowDownOutline: markRaw(ArrowDownOutline),
  ArrowBackOutline: markRaw(ArrowBackOutline),
  ArrowForwardOutline: markRaw(ArrowForwardOutline),
  SwapHorizontalOutline: markRaw(SwapHorizontalOutline),
  SwapVerticalOutline: markRaw(SwapVerticalOutline),
  CopyOutline: markRaw(CopyOutline),
  ClipboardOutline: markRaw(ClipboardOutline),
  CutOutline: markRaw(CutOutline),
  SaveOutline: markRaw(SaveOutline),
  CodeOutline: markRaw(CodeOutline),
  CodeSlashOutline: markRaw(CodeSlashOutline),
  TerminalOutline: markRaw(TerminalOutline),
  GitBranchOutline: markRaw(GitBranchOutline),
  GitCommitOutline: markRaw(GitCommitOutline),
  GitMergeOutline: markRaw(GitMergeOutline),
  GitPullRequestOutline: markRaw(GitPullRequestOutline),
  BugOutline: markRaw(BugOutline),
  FlaskOutline: markRaw(FlaskOutline),
  RocketOutline: markRaw(RocketOutline),
  FlashOutline: markRaw(FlashOutline),
  BulbOutline: markRaw(BulbOutline),
  ExtensionPuzzleOutline: markRaw(ExtensionPuzzleOutline),
  LayersOutline: markRaw(LayersOutline),
  CubeOutline: markRaw(CubeOutline),
  ShapesOutline: markRaw(ShapesOutline),
  EllipseOutline: markRaw(EllipseOutline),
  SquareOutline: markRaw(SquareOutline),
  TriangleOutline: markRaw(TriangleOutline),
  BusinessOutline: markRaw(BusinessOutline),
  StorefrontOutline: markRaw(StorefrontOutline),
  SchoolOutline: markRaw(SchoolOutline),
  LibraryOutline: markRaw(LibraryOutline),
  MedkitOutline: markRaw(MedkitOutline),
  RestaurantOutline: markRaw(RestaurantOutline),
  CafeOutline: markRaw(CafeOutline),
  BeerOutline: markRaw(BeerOutline),
  WineOutline: markRaw(WineOutline),
  PizzaOutline: markRaw(PizzaOutline),
  FastFoodOutline: markRaw(FastFoodOutline),
  IceCreamOutline: markRaw(IceCreamOutline),
  LeafOutline: markRaw(LeafOutline),
  FlowerOutline: markRaw(FlowerOutline),
  PawOutline: markRaw(PawOutline),
  FingerPrintOutline: markRaw(FingerPrintOutline),
  HandLeftOutline: markRaw(HandLeftOutline),
  HandRightOutline: markRaw(HandRightOutline),
  ThumbsUpOutline: markRaw(ThumbsUpOutline),
  ThumbsDownOutline: markRaw(ThumbsDownOutline),
  HappyOutline: markRaw(HappyOutline),
  SadOutline: markRaw(SadOutline),
  AccessibilityOutline: markRaw(AccessibilityOutline),
  BodyOutline: markRaw(BodyOutline),
  ManOutline: markRaw(ManOutline),
  WomanOutline: markRaw(WomanOutline),
  MaleOutline: markRaw(MaleOutline),
  FemaleOutline: markRaw(FemaleOutline),
  TransgenderOutline: markRaw(TransgenderOutline),
  PlanetOutline: markRaw(PlanetOutline),
  EarthOutline: markRaw(EarthOutline),
  CloseOutline: markRaw(CloseOutline),
  EllipsisHorizontalOutline: markRaw(EllipsisHorizontalOutline),
  EllipsisVerticalOutline: markRaw(EllipsisVerticalOutline),
  ReorderFourOutline: markRaw(ReorderFourOutline),
  ReorderThreeOutline: markRaw(ReorderThreeOutline),
  ReorderTwoOutline: markRaw(ReorderTwoOutline)
}

/**
 * 根据图标名称获取图标组件
 * @param name 图标名称
 */
export function getIconComponent(name: string): Component | undefined {
  return iconMap[name]
}
