"use strict";
import ArrayVisualization from './array_visualization';
import ZoomControl from './zoom_control';
import OverlayControl from './overlay_control';
import SeismicControl from './seismic_control';
import SubarrayDisplay from './subarray_display';
import AutoUpload from './auto_upload';

$(document).ready(function () {
  AutoUpload();

  if (is_csv_available) {
      let subarrayDisplay = new SubarrayDisplay();
      subarrayDisplay.init($('#current_anchors'), $('#needed_anchors'), $('#subarray_weight'), panel_data);
      let arrayVisualization = new ArrayVisualization(panel_data, is_dual_tilt, subarrayDisplay, buildings_coordinates);
      arrayVisualization.init();
      new ZoomControl(arrayVisualization).init($('#zoom_control'));
      new OverlayControl(arrayVisualization).init($('#overlay_control'), $('#legend_container'));
      new SeismicControl(arrayVisualization, subarrayDisplay).init($('.seismic_anchor_control'), $("#seismic_save"));
      window.arrayVisualization = arrayVisualization;
  }

});
