"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fields_1 = require("../ecommerce/fields");
const functions_1 = require("../ecommerce/functions");
const action = {
    title: 'Ecommerce Event (single product)',
    description: '(Beta) Send a single product [Ecommerce Recommended event](https://www.braze.com/docs/user_guide/data/activation/custom_data/recommended_events/ecommerce_events) to Braze.',
    fields: {
        ...fields_1.commonFields,
        product: fields_1.product
    },
    syncMode: {
        description: 'Define how the records from your destination will be synced.',
        label: 'How to track events',
        default: 'add',
        choices: [
            { label: 'Add Profile with Event', value: 'add' },
            { label: 'Update Profile with Event', value: 'update' }
        ]
    },
    perform: async (request, { payload, settings, syncMode }) => {
        return await (0, functions_1.send)(request, [payload], settings, false, syncMode);
    },
    performBatch: async (request, { payload, settings, syncMode }) => {
        return await (0, functions_1.send)(request, payload, settings, true, syncMode);
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map