import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { BarChart, LineChart, PieChart, RadarChart, HeatmapChart, GraphChart } from 'echarts/charts'
import {
  GridComponent,
  TooltipComponent,
  LegendComponent,
  DataZoomComponent,
  GraphicComponent,
  TitleComponent,
  CalendarComponent,
  VisualMapComponent,
  ToolboxComponent
} from 'echarts/components'
import Chart from './Chart/index.vue'

import Breadcrumb from './Breadcrumb/index.vue'
import EmailAutoComplete from './EmailAutoComplete/index.vue'
import AppPageShell from './layout/AppPageShell.vue'
import AppQueryFilter from './layout/AppQueryFilter.vue'
import AppTableEllipsis from './layout/AppTableEllipsis.vue'

use([
  CanvasRenderer,
  BarChart,
  LineChart,
  PieChart,
  RadarChart,
  HeatmapChart,
  GraphChart,
  GridComponent,
  TooltipComponent,
  LegendComponent,
  DataZoomComponent,
  GraphicComponent,
  CalendarComponent,
  VisualMapComponent,
  TitleComponent,
  ToolboxComponent
])

export default {
  install(Vue) {
    Vue.component('Chart', Chart)
    Vue.component('Breadcrumb', Breadcrumb)
    Vue.component('EmailAutoComplete', EmailAutoComplete)
    Vue.component('AppPageShell', AppPageShell)
    Vue.component('AppQueryFilter', AppQueryFilter)
    Vue.component('AppTableEllipsis', AppTableEllipsis)
  },
}
