text: import * as tslib_1 from "tslib";
  import { Directive } from '@angular/core';
  import { BaseMapDirective } from './base-map-directive';
  import { NguiMapComponent } from '../components/ngui-map.component';
  var INPUTS = [
      'selector', 'options',
      'addressControl', 'addressControlOptions', 'clickToGo', 'disableDefaultUI', 'disableDoubleClickZoom',
      'enableCloseButton', 'fullscreenControl', 'fullscreenControlOptions', 'imageDateControl', 'linksControl',
      'motionTracking', 'motionTrackingControl', 'panControl', 'panControlOptions', 'pano',
      'position', 'pov', 'scrollwheel', 'showRoadLabels', 'visible', 'zoomControl', 'zoomControlOptions'
  ];
  var OUTPUTS = [
      'closeclick', 'pano_changed', 'position_changed', 'pov_changed', 'resize', 'status_changed',
      'visible_changed', 'zoom_changed'
  ];
  var StreetViewPanorama = (function (_super) {
      tslib_1.__extends(StreetViewPanorama, _super);
      function StreetViewPanorama(nguiMapComp) {
          return _super.call(this, nguiMapComp, 'StreetViewPanorama', INPUTS, OUTPUTS) || this;
      }
      // only called when map is ready
      StreetViewPanorama.prototype.initialize = function () {
          this.objectOptions = this.optionBuilder.googlizeAllInputs(this.inputs, this);
          var element;
          if (this.objectOptions.selector) {
              // noinspection TypeScriptValidateTypes
              element = document.querySelector(this['selector']);
              delete this.objectOptions.selector;
          }
          else {
              element = this.nguiMapComponent.el;
          }
          // will be set after geocoded
          typeof this.objectOptions.position === 'string' && (delete this.objectOptions.position);
          this.mapObject = new google.maps[this.mapObjectName](element, this.objectOptions);
          this.mapObject['mapObjectName'] = this.mapObjectName;
          this.mapObject['nguiMapComponent'] = this.nguiMapComponent;
          // set google events listeners and emits to this outputs listeners
          this.nguiMap.setObjectEvents(this.outputs, this, 'mapObject');
          this.nguiMapComponent.addToMapObjectGroup(this.mapObjectName, this.mapObject);
          this.initialized$.emit(this.mapObject);
      };
      // When destroyed, remove event listener, and delete this object to prevent memory leak
      StreetViewPanorama.prototype.ngOnDestroy = function () {
          if (this.nguiMapComponent.el) {
              this.nguiMap.clearObjectEvents(this.outputs, this, 'mapObject');
          }
      };
      return StreetViewPanorama;
  }(BaseMapDirective));
  StreetViewPanorama = tslib_1.__decorate([
      Directive({
          selector: 'ngui-map > street-view-panorama',
          inputs: INPUTS,
          outputs: OUTPUTS,
      }),
      tslib_1.__metadata("design:paramtypes", [NguiMapComponent])
  ], StreetViewPanorama);
  export { StreetViewPanorama };
  //# sourceMappingURL=street-view-panorama.js.map