import TslDatePicker from "../packages/tsl-date-picker/index.js";
import TslDrawSvg from "../packages/tsl-draw-svg/index";
import TslInput from "../packages/input/index.js";
import TslAudio from "../packages/tsl-audio/index";
import TslBaseDialog from "../packages/tsl-base-dialog/index";
import TslAudioClient from "../packages/tsl-audio/TslAudioClient";
import TslCard from "../packages/tsl-card/index";
import InfiniteLoading from "../packages/infinite-loading/index";
import TslMultiDialog from "../packages/tsl-multi-dialog/index";
import TslVideoControl from "../packages/tsl-video-control/index";
import TslVideoPlayer from "../packages/tsl-video-player/index";
import TslClock from "../packages/tsl-clock/index";
import TslIcon from "../packages/tsl-icon/index";
import TslNumFlap from "../packages/tsl-num-flap/index";
import TslPopUp from "../packages/tsl-pop-up/index";
import TslCharts from "../packages/tsl-charts/index";
import TslCompare from "../packages/tsl-compare/index";
import TslDynamic from "../packages/tsl-dynamic/index";
import TslMatrix from "../packages/tsl-matrix/index";
import TslMqttClient from "../packages/tsl-mqtt/TslMqttClient";
// import TslProgress from "../packages/tsl-progress/index"
// import TslSnapshot from "../packages/tsl-snapshot/index"
// import TslTimeline from "../packages/tsl-timeline/index"
import TslWeather from "../packages/tsl-weather/index";
import TslMapPlotting from "../packages/tsl-map-plotting/index";
import TslMapClient from "../packages/tsl-map/js/TslMapClient";
import CoordsConvertUtil from "../packages/tsl-map/js/CoordsConvert";
import TslMapClassUtil from "../packages/tsl-map/js/TslMapClassUtil";


const components = [
  TslDatePicker,
  TslDrawSvg,
  TslInput,
  TslAudio,
  TslBaseDialog,
  InfiniteLoading,
  TslMultiDialog,
  TslVideoControl,
  TslVideoPlayer,
  TslClock,
  TslIcon,
  TslNumFlap,
  TslPopUp,
  TslCharts,
  TslCompare,
  TslMatrix,
  // TslProgress,
  // TslSnapshot,
  // TslTimeline,
  TslWeather,
  TslDynamic,
  TslCard,
  TslMapPlotting,
];

const install = function(Vue, opts = {}) {
  components.forEach((component) => {
    Vue.component(component.name, component);
  });

  // Vue.prototype.$ELEMENT = {
  //   size: opts.size || "",
  //   zIndex: opts.zIndex || 2000,
  // };
};

/* istanbul ignore if */
if (typeof window !== "undefined" && window.Vue) {
  install(window.Vue);
}

export default {
  version: "0.0.1",
  install,
  TslInput,
  TslAudio,
  TslBaseDialog,
  TslDatePicker,
  TslDrawSvg,
  TslMultiDialog,
  TslVideoPlayer,
  TslVideoControl,
  TslClock,
  TslIcon,
  TslNumFlap,
  TslPopUp,
  TslCharts,
  TslCompare,
  TslMatrix,
  // TslProgress,
  // TslSnapshot,
  // TslTimeline,
  TslWeather,
  TslDynamic,
  TslCard,
  TslMapPlotting,
  TslMqttClient,
  TslMapClient,
  TslAudioClient,
  CoordsConvertUtil,
  TslMapClassUtil
};
