text: function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  
  import React from 'react';
  import PropTypes from 'prop-types';
  import Flex from './Flex'; // import { getTileClasses } from './shared/utils';
  
  import { tileGroupProps } from './shared/propTypes'; // eslint-disable-next-line import/no-named-as-default
  
  import getCustomTileClasses from './shared/customUtils';
  export default function TileGroup(_ref) {
    var className = _ref.className,
        _ref$count = _ref.count,
        count = _ref$count === void 0 ? 3 : _ref$count,
        dateTransform = _ref.dateTransform,
        dateType = _ref.dateType,
        end = _ref.end,
        hover = _ref.hover,
        offset = _ref.offset,
        start = _ref.start,
        _ref$step = _ref.step,
        step = _ref$step === void 0 ? 1 : _ref$step,
        Tile = _ref.tile,
        value = _ref.value,
        valueType = _ref.valueType,
        tileProps = _objectWithoutProperties(_ref, ["className", "count", "dateTransform", "dateType", "end", "hover", "offset", "start", "step", "tile", "value", "valueType"]);
  
    var tiles = [];
  
    for (var point = start; point <= end; point += step) {
      var date = dateTransform(point);
      tiles.push(React.createElement(Tile, _extends({
        key: date.getTime(),
        classes: getCustomTileClasses({
          value: value,
          valueType: valueType,
          date: date,
          dateType: dateType,
          hover: hover
        }),
        date: date,
        point: point
      }, tileProps)));
    }
  
    return React.createElement(Flex, {
      className: className,
      count: count,
      offset: offset,
      wrap: true
    }, tiles);
  }
  TileGroup.propTypes = _objectSpread({}, tileGroupProps, {
    activeStartDate: PropTypes.instanceOf(Date),
    count: PropTypes.number,
    dateTransform: PropTypes.func.isRequired,
    offset: PropTypes.number,
    step: PropTypes.number,
    tile: PropTypes.func.isRequired
  });