import { user_properties, params, value, user_id, currency, items_single_products } from '../ga4-properties';
import { updateUser } from '../ga4-functions';
const action = {
    title: 'Remove from Cart',
    description: 'This event signifies that an item was removed from a cart.',
    platform: 'web',
    defaultSubscription: 'type = "track" and event = "Product Removed"',
    fields: {
        user_id: user_id,
        currency: currency,
        value: value,
        items: {
            ...items_single_products,
            required: true
        },
        user_properties: user_properties,
        params: params
    },
    perform: (gtag, { payload }) => {
        updateUser(payload.user_id, payload.user_properties, gtag);
        gtag('event', 'remove_from_cart', {
            currency: payload.currency,
            value: payload.value,
            items: payload.items,
            ...payload.params
        });
    }
};
export default action;
//# sourceMappingURL=index.js.map