"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformPayload = transformPayload;
const transformCart_1 = require("../transformFields/transformCart");
const transformCartLine_1 = require("../transformFields/transformCartLine");
const transformCheckout_1 = require("../transformFields/transformCheckout");
const transformCollection_1 = require("../transformFields/transformCollection");
const transformCommonFields_1 = require("../transformFields/transformCommonFields");
const transformCustomer_1 = require("../transformFields/transformCustomer");
const transformForm_1 = require("../transformFields/transformForm");
const transformProductVariant_1 = require("../transformFields/transformProductVariant");
const transformSearch_1 = require("../transformFields/transformSearch");
function transformPayload(payload) {
    const commonFields = (0, transformCommonFields_1.transformCommonFields)(payload);
    const result = {
        ...commonFields,
        custom_event_name: payload.customEventName,
        data: {
            ...commonFields.data,
            ...(0, transformCustomer_1.transformCustomer)(payload),
            ...(0, transformCart_1.transformCart)(payload),
            ...(0, transformCartLine_1.transformCartLine)(payload),
            ...(0, transformCheckout_1.transformCheckout)(payload),
            ...(0, transformCollection_1.transformCollection)(payload),
            ...(0, transformForm_1.transformForm)(payload),
            ...(0, transformProductVariant_1.transformProductVariant)(payload),
            ...(0, transformSearch_1.transformSearch)(payload)
        }
    };
    return result;
}
//# sourceMappingURL=transform-payload.js.map