"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getFirstOccupationOption = void 0;
const getFirstOccupationOption = function () {
  let {
    rates = [],
    roomId
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const {
    occupationOptions = {}
  } = rates.find(function () {
    let room = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    return room.id === roomId;
  }) || {};
  const [firstOption] = Object.keys(occupationOptions);
  return firstOption ? occupationOptions[firstOption] : undefined;
};
exports.getFirstOccupationOption = getFirstOccupationOption;
//# sourceMappingURL=getFirstOccupationOption.js.map