"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getInitEvent = void 0;
var _Core = require("../../../../../Core.constants");
const ACCOMMODATION_TYPE_NAME = Object.keys(_Core.ACCOMMODATION_TYPE);
const getInitEvent = _ref => {
  var _variants$hotelId;
  let {
    mobile,
    step,
    hotel: {
      accommodationType,
      id: hotelId,
      variants = {}
    } = {},
    id,
    type
  } = _ref;
  return {
    chainId: type === _Core.TYPE.CHAIN ? id : undefined,
    device: mobile ? 'MOBILE' : 'DESKTOP_TABLET',
    event: 'init',
    home: window.location.host,
    hotelId,
    lodgingDenomination: ACCOMMODATION_TYPE_NAME[((_variants$hotelId = variants[hotelId]) === null || _variants$hotelId === void 0 ? void 0 : _variants$hotelId.accommodationType) || accommodationType],
    step
  };
};
exports.getInitEvent = getInitEvent;
//# sourceMappingURL=getInitEvent.js.map