"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.feetAndInchesToInches = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const config_1 = require("./config");
const zod_1 = require("zod");
exports.feetAndInchesToInches = {
    key: 'feetAndInchesToInches',
    title: 'Feet and inches to inches',
    description: 'Transform feet and inches to inches',
    category: extensions_core_1.Category.DATA,
    fields: config_1.fields,
    dataPoints: config_1.dataPoints,
    previewable: true,
    onActivityCreated: async (payload, onComplete, onError) => {
        const { fields: { feet, inches }, } = (0, extensions_core_1.validate)({
            schema: zod_1.z.object({
                fields: config_1.FieldsValidationSchema,
            }),
            payload,
        });
        const totalInches = feet * 12 + inches;
        await onComplete({
            data_points: {
                inches: String(totalInches),
            },
        });
    },
};
//# sourceMappingURL=feetAndInchesToInches.js.map