"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.bookingResponse = void 0;
var _legacy = require("../helpers/legacy");
const bookingResponse = function () {
  let {
    instances: [{
      idAffilired
    } = {}] = [],
    response: {
      tracking = {}
    } = {},
    store: {
      hotel: {
        id: hotelId
      } = {}
    } = {}
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  if (!window.recV3) return {};

  // ! -- TODO: use of tracking should be a temporary approach ---------------------------------------------------------
  const {
    bookingValues: {
      checkout
    } = {},
    hotelInfo: {
      currency: hotelCurrency = {},
      propertyName
    } = {},
    idReservation,
    totalPriceWithoutTaxes
  } = tracking;
  const htname = '';
  const pixel = 0;
  const payoutCodes = '';
  const offlineCode = '';
  window.recV3((0, _legacy.formatPrice)(totalPriceWithoutTaxes, hotelCurrency), "".concat(idReservation, " ").concat(propertyName), idAffilired, hotelId, htname, pixel, payoutCodes, offlineCode, checkout, hotelCurrency.currency);
  return {};
};
exports.bookingResponse = bookingResponse;
//# sourceMappingURL=bookingResponse.js.map