"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("./utils");
const fields_1 = require("./fields");
const dynamic_fields_1 = require("./dynamic-fields");
const action = {
    title: 'Send Email with Dynamic Template',
    description: 'Send email to recipient(s) using a Dynamic Template in Sendgrid',
    fields: fields_1.fields,
    dynamicFields: {
        template_id: async (request, { settings }) => {
            return await (0, dynamic_fields_1.dynamicTemplateId)(request, settings);
        },
        ip_pool_name: async (request, { settings }) => {
            return await (0, dynamic_fields_1.dynamicIpPoolNames)(request, settings);
        },
        dynamic_template_data: {
            __keys__: async (request, { payload, settings }) => {
                return await (0, dynamic_fields_1.dynamicTemplateData)(request, payload, settings);
            }
        },
        domain: async (request, { settings }) => {
            return await (0, dynamic_fields_1.dynamicDomain)(request, settings);
        },
        group_id: async (request, { settings }) => {
            return await (0, dynamic_fields_1.dynamicGroupId)(request, settings);
        }
    },
    perform: async (request, { payload, settings }) => {
        return await (0, utils_1.send)(request, payload, settings);
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map