"use strict";

var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");

var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");

_Object$defineProperty(exports, "__esModule", {
  value: true
});

exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));

var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _MediaViewContent = _interopRequireDefault(require("./MediaViewContent"));

var _ViewWrapper = _interopRequireDefault(require("../ViewWrapper"));

// @flow
var MapView = function MapView(_ref) {
  var observations = _ref.observations,
      onUpdateObservation = _ref.onUpdateObservation,
      onDeleteObservation = _ref.onDeleteObservation,
      presets = _ref.presets,
      filter = (0, _filter.default)(_ref),
      getMediaUrl = _ref.getMediaUrl,
      otherProps = (0, _objectWithoutProperties2.default)(_ref, ["observations", "onUpdateObservation", "onDeleteObservation", "presets", "filter", "getMediaUrl"]);
  return /*#__PURE__*/_react.default.createElement(_ViewWrapper.default, {
    observations: observations,
    onUpdateObservation: onUpdateObservation,
    onDeleteObservation: onDeleteObservation,
    presets: presets,
    filter: filter,
    getMediaUrl: getMediaUrl
  }, function (_ref2) {
    var onClickObservation = _ref2.onClickObservation,
        filteredObservations = _ref2.filteredObservations,
        getPreset = _ref2.getPreset,
        getMedia = _ref2.getMedia;
    return /*#__PURE__*/_react.default.createElement(_MediaViewContent.default, (0, _extends2.default)({
      onClick: onClickObservation,
      observations: filteredObservations,
      getPreset: getPreset,
      getMedia: getMedia
    }, otherProps));
  });
};

var _default = MapView;
exports.default = _default;
//# sourceMappingURL=MediaView.js.map