import "element-plus/lib/theme-chalk/base.css";
import {
  ElButton,
  ElCheckbox,
  ElForm,
  ElFormItem,
  ElInput,
  ElLink,
  ElRadio,
  ElTabPane,
  ElTabs,
  ElSelect,
  ElIcon,
  ElPagination,
  ElDialog,
  ElDatePicker,
  ElUpload,
  ElDivider,
  ElRadioButton,
  ElRadioGroup,
  ElPopover,
  ElCarousel,
  ElCarouselItem,
  ElOption,
  ElTable,
  ElTableColumn,
  ElDescriptionsItem,
  ElDescriptions,
  ElCard,
  ElRow,
  ElCol,
  ElTag,
  ElTimeline,
  ElTimelineItem,
  ElBacktop,
  ElMenu,
  ElMenuItem,
  ElSubmenu, ElCollapse, ElCollapseItem,
  ElSwitch,
  ElBadge, ElOptionGroup, ElTooltip,
} from "element-plus";

// NOTE 使用到的组件列表，请确保 import 和 component 的一致性

const components = [
  ElButton,
  ElForm,
  ElFormItem,
  ElInput,
  ElRadio,
  ElTabs,
  ElTabPane,
  ElCheckbox,
  ElLink,
  ElSelect,
  ElOption,
  ElTable,
  ElTableColumn,
  ElIcon,
  ElPagination,
  ElDialog,
  ElDatePicker,
  ElUpload,
  ElDivider,
  ElRadioButton,
  ElRadioGroup,
  ElPopover,
  ElCarousel,
  ElCarouselItem,
  ElDescriptions,
  ElDescriptionsItem,
  ElCard,
  ElRow,
  ElCol,
  ElTag,
  ElTimeline,
  ElTimelineItem,
  ElBacktop,
  ElMenu,
  ElMenuItem,
  ElSubmenu,
  ElCollapse,
  ElCollapseItem,
  ElSwitch,
  ElBadge,
  ElOptionGroup,
  ElTooltip,
];

export default function (app) {
  for (const component of components) {
    app.component(component.name, component);
  }
}
