import { use } from "echarts/core";
import { CanvasRenderer } from "echarts/renderers";
import {
  BarChart,
  LineChart,
  PieChart,
  RadarChart,
  GaugeChart,
} from "echarts/charts";
import {
  GridComponent,
  TooltipComponent,
  LegendComponent,
  DataZoomComponent,
  GraphicComponent,
  TitleComponent,
  GeoComponent,
  LegendScrollComponent,
  ToolboxComponent,
} from "echarts/components";

import MyModal from "./MyModal/index.vue";
import FooterInfo from "./FooterInfo/index.vue";
import SelectCourse from "./SelectCourse/index.vue";
import MyQuote from "./MyQuote/index.vue";
import Accordion from "./Accordion/index.vue";
import ImportButton from "./ImportButton/index.vue";

use([
  CanvasRenderer,
  BarChart,
  LineChart,
  PieChart,
  RadarChart,
  GaugeChart,
  GridComponent,
  TooltipComponent,
  LegendComponent,
  DataZoomComponent,
  GraphicComponent,
  TitleComponent,
  GeoComponent,
  LegendScrollComponent,
  ToolboxComponent,
]);

export default {
  install(Vue: any) {
    Vue.component("MyModal", MyModal);
    Vue.component("FooterInfo", FooterInfo);
    Vue.component("SelectCourse", SelectCourse);
    Vue.component("MyQuote", MyQuote);
    Vue.component("Accordion", Accordion);
    Vue.component("ImportButton", ImportButton);
  },
};
