import Vue from "vue";
import VueClipBoard from "vue-clipboard2";
import interact from "./src/directives/interact";
import "./src/style/index.scss";

import MMCCodeDemo from "./src/components/MMCCodeDemo";
import MMCDataTransferPanel from "./src/components/MMCDataTransferPanel";
import MMCPlayer from "./src/components/MMCPlayer";
import MMCUavList from "./src/components/MMCUavList";
import MMCMQTT from './src/plugins/MMCMQTT';
import MMCGroundStation from "./src/plugins/MMCGroundStation";

const components = [
  MMCCodeDemo,
  MMCDataTransferPanel,
  MMCPlayer,
  MMCUavList
];
const plugins = [MMCMQTT, MMCGroundStation];


export default {
  install: function (Vue, options) {
    Vue.use(VueClipBoard);
    Vue.directive(interact.name, interact.directive);
    components.forEach((component) => {
      Vue.component(component.name, component);
    });
    plugins.forEach((plugin) => {
      Vue.use(plugin);
    });
  },
  ...components,
  ...plugins
};
