import _extends from "@babel/runtime-corejs3/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
// @flow
import React from 'react';
import MediaViewContent from './MediaViewContent';
import ViewWrapper from '../ViewWrapper';
/*:: import { type CommonViewProps } from '../ViewWrapper';*/

const MapView = (_ref) => {
  let {
    observations,
    onUpdateObservation,
    onDeleteObservation,
    presets,
    filter,
    getMediaUrl
  }
  /*: CommonViewProps*/
  = _ref,
      otherProps = _objectWithoutPropertiesLoose(_ref, ["observations", "onUpdateObservation", "onDeleteObservation", "presets", "filter", "getMediaUrl"]);

  return /*#__PURE__*/React.createElement(ViewWrapper, {
    observations: observations,
    onUpdateObservation: onUpdateObservation,
    onDeleteObservation: onDeleteObservation,
    presets: presets,
    filter: filter,
    getMediaUrl: getMediaUrl
  }, ({
    onClickObservation,
    filteredObservations,
    getPreset,
    getMedia
  }) => /*#__PURE__*/React.createElement(MediaViewContent, _extends({
    onClick: onClickObservation,
    observations: filteredObservations,
    getPreset: getPreset,
    getMedia: getMedia
  }, otherProps)));
};

export default MapView;
//# sourceMappingURL=MediaView.js.map