"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ga4_properties_1 = require("../ga4-properties");
const ga4_functions_1 = require("../ga4-functions");
const action = {
    title: 'Add to Wishlist',
    description: 'The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.',
    platform: 'web',
    defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
    fields: {
        user_id: ga4_properties_1.user_id,
        currency: ga4_properties_1.currency,
        value: ga4_properties_1.value,
        items: {
            ...ga4_properties_1.items_single_products,
            required: true
        },
        user_properties: ga4_properties_1.user_properties,
        params: ga4_properties_1.params
    },
    perform: (gtag, { payload }) => {
        ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
        gtag('event', 'add_to_wishlist', {
            currency: payload.currency,
            value: payload.value,
            items: payload.items,
            ...payload.params
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map