import type { App } from 'vue';
import {
  create,
  NBreadcrumb,
  NBreadcrumbItem,
  NButton,
  NCard,
  NCheckbox,
  NColorPicker,
  NConfigProvider,
  NDataTable,
  NDescriptions,
  NDescriptionsItem,
  NDialogProvider,
  NDivider,
  NDrawer,
  NDrawerContent,
  NDropdown,
  NEmpty,
  NForm,
  NFormItem,
  NGradientText,
  NGrid,
  NGridItem,
  NInput,
  NInputGroup,
  NInputNumber,
  NList,
  NListItem,
  NLoadingBarProvider,
  NModal,
  NMenu,
  NMessageProvider,
  NNotificationProvider,
  NPopover,
  NScrollbar,
  NSelect,
  NSpace,
  NStatistic,
  NSwitch,
  NSpin,
  NTabs,
  NTabPane,
  NTag,
  NTooltip,
  NRadio,
  NRadioGroup,
  NPopselect,
  NAutoComplete,
  NTreeSelect,
  NPagination,
  NTree,
  NDatePicker,
  NTab,
  NImage,
  NUpload,
  NUploadFileList,
  NUploadDragger,
  NUploadTrigger,
  NImageGroup,
  NCollapseTransition,
  NH1,
  NH2,
  NH3,
  NH4,
  NH5,
  NH6,
  NP,
  NBlockquote,
  NText,
  NRow,
  NCol,
  NBackTop,
  NIcon,
  NNumberAnimation,
  NSkeleton,
  NTransfer,
  NAvatar,
  NTimeline,
  NTimelineItem,
  NAlert,
  NLayout,
  NLayoutSider
} from 'naive-ui';

/** 按需引入naiveUI */
export default function setupNaiveUI(app: App) {
  const naive = create({
    components: [
      NAvatar,
      NBreadcrumb,
      NBreadcrumbItem,
      NButton,
      NCard,
      NCheckbox,
      NColorPicker,
      NConfigProvider,
      NDataTable,
      NDescriptions,
      NDescriptionsItem,
      NDialogProvider,
      NDivider,
      NDrawer,
      NDrawerContent,
      NDropdown,
      NEmpty,
      NForm,
      NFormItem,
      NGradientText,
      NGrid,
      NGridItem,
      NInput,
      NInputGroup,
      NInputNumber,
      NList,
      NListItem,
      NLoadingBarProvider,
      NModal,
      NMenu,
      NMessageProvider,
      NNotificationProvider,
      NPopover,
      NScrollbar,
      NSelect,
      NSpace,
      NStatistic,
      NSwitch,
      NSpin,
      NTabs,
      NTabPane,
      NTag,
      NTooltip,
      NRadio,
      NRadioGroup,
      NPopselect,
      NAutoComplete,
      NTreeSelect,
      NPagination,
      NTree,
      NDatePicker,
      NTab,
      NImage,
      NUpload,
      NUploadFileList,
      NUploadDragger,
      NUploadTrigger,
      NImageGroup,
      NCollapseTransition,
      NH1,
      NH2,
      NH3,
      NH4,
      NH5,
      NH6,
      NP,
      NBlockquote,
      NText,
      NRow,
      NCol,
      NBackTop,
      NIcon,
      NNumberAnimation,
      NSkeleton,
      NTransfer,
      NTimeline,
      NTimelineItem,
      NAlert,
      NLayout,
      NLayoutSider
    ]
  });
  app.use(naive);
}
