"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = FormattedTimeRange;

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

var _momentTimezone = _interopRequireDefault(require("moment-timezone"));

var _reactIntl = require("react-intl");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Renders a time range e.g. 3:45pm-4:15pm according to the
 * react-intl default time format for the ambient locale.
 */
function FormattedTimeRange({
  endTime,
  startTime
}) {
  return /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, {
    id: "common.time.departureArrivalTimes",
    values: {
      endTime: (0, _momentTimezone.default)(endTime),
      startTime: (0, _momentTimezone.default)(startTime)
    }
  });
}

module.exports = exports.default;

//# sourceMappingURL=formatted-time-range.js