"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.embeddedCheckout = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const settings_1 = require("../../settings");
const config_1 = require("./config");
const zod_1 = require("zod");
exports.embeddedCheckout = {
    key: 'embeddedCheckout',
    category: extensions_core_1.Category.BILLING,
    title: 'Embedded checkout',
    description: 'Embedded checkout in Awell Hosted Pages',
    fields: config_1.fields,
    previewable: false,
    dataPoints: config_1.dataPoints,
    options: {
        stakeholders: {
            label: 'Stakeholder',
            mode: 'single',
        },
    },
    onActivityCreated: async (payload, onComplete, onError) => {
        (0, extensions_core_1.validate)({
            schema: zod_1.z.object({
                fields: config_1.FieldsValidationSchema,
                settings: settings_1.SettingsValidationSchema,
            }),
            payload,
        });
        // Completion happens in Hosted Pages
    },
};
//# sourceMappingURL=embeddedCheckout.js.map