import type { App } from 'vue'
import {
  App as antApp,
  Button,
  Tree,
  ConfigProvider,
  Layout,
  Menu,
  PageHeader,
  Dropdown,
  Drawer,
  Space,
  Switch,
  Input,
  Form,
  Popover,
  Row,
  Col,
  Select,
  Checkbox,
  Modal,
  Tag,
  AutoComplete,
  Upload,
  Radio,
  Tabs,
  Timeline,
  Carousel,
  Spin,
  List,
  Tooltip,
  Card,
  DatePicker,
  Divider,
  message,
  InputNumber,
  TreeSelect,
  Steps,
  Pagination,
  Popconfirm,
  Cascader,
  Badge,
  Empty,
  Progress,
  Affix,
  Descriptions,
  Slider,
  Table
} from 'ant-design-vue'

import { router } from '@/router/index.ts'


const [ messageApi, contextHolder] = message.useMessage();

// 注册全局组件
export function loadComponent(app: App<Element>) {
  app
    .use(ConfigProvider)
    .use(Layout)
    .use(Checkbox)
    .use(Menu)
    .use(Button)
    .use(Tree)
    .use(antApp)
    .use(PageHeader)
    .use(Dropdown)
    .use(Drawer)
    .use(Space)
    .use(Switch)
    .use(Input)
    .use(Form)
    .use(Popover)
    .use(Row)
    .use(Col)
    .use(Select)
    .use(Table)
    .use(Modal)
    .use(Tag)
    .use(AutoComplete)
    .use(Upload)
    .use(Radio)
    .use(Tabs)
    .use(Timeline)
    .use(Carousel)
    .use(Spin)
    .use(List)
    .use(Tooltip)
    .use(Card)
    .use(DatePicker)
    .use(Divider)
    .use(List)
    .use(InputNumber)
    .use(TreeSelect)
    // .use(hevueImgPreview)
    .use(Steps)
    .use(Pagination)
    .use(Popconfirm)
    .use(Cascader)
    .use(Badge)
    .use(Empty)
    .use(Progress)
    .use(Affix)
    .use(Descriptions)
    .use(Slider)


}

// 注册全局方法
export function loadFunc (app: App<Element>) {


}

