"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getScrollHeight = void 0;
const getScrollHeight = function () {
  let {
    hasAges,
    roomIndex,
    rooms = []
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  return rooms.reduce((previous, current, index) => index < roomIndex || index === roomIndex && index === rooms.length - 1 && hasAges ? previous + current : previous, 0);
};
exports.getScrollHeight = getScrollHeight;
//# sourceMappingURL=getScrollHeight.js.map