"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = require("zod");
const LanguageEnum = zod_1.z.enum(['English', 'Dutch', 'French']);
const ScopeEnum = zod_1.z.enum(['Step', 'Track']);
const FormSelectionEnum = zod_1.z.enum(['Latest', 'All']);
exports.fields = {
    scope: {
        id: 'scope',
        label: 'Scope',
        description: 'The scope in which to look for forms. Default is "Step" (current step only).',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        options: {
            dropdownOptions: Object.values(ScopeEnum.enum).map((scope) => ({
                label: scope,
                value: scope,
            })),
        },
    },
    formSelection: {
        id: 'formSelection',
        label: 'Form selection',
        description: 'Whether to capture the most recent form or all forms in the scope. Default is "Latest". Form headers will be included if "All" is selected.',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        options: {
            dropdownOptions: Object.values(FormSelectionEnum.enum).map((selection) => ({
                label: selection,
                value: selection,
            })),
        },
    },
    language: {
        id: 'language',
        label: 'Language',
        description: 'The language the output should be in. Default is English.',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        options: {
            dropdownOptions: Object.values(LanguageEnum.enum).map((language) => ({
                label: language,
                value: language,
            })),
        },
    },
    includeDescriptions: {
        id: 'includeDescriptions',
        label: 'Include descriptions',
        description: 'Should descriptions be included in the output? Default is "Yes".',
        type: extensions_core_1.FieldType.BOOLEAN,
        required: false,
    },
    includeMissingAnswers: {
        id: 'includeMissingAnswers',
        label: 'Include missing answers',
        description: 'Should missing or unanswered questions be included in the output? Default is "Yes".',
        type: extensions_core_1.FieldType.BOOLEAN,
        required: false,
    },
    separator: {
        id: 'separator',
        label: 'Separator',
        description: 'The separator to use between questions. If not provided, questions will be separated by a blank line.',
        type: extensions_core_1.FieldType.STRING,
        required: false,
    },
};
exports.FieldsValidationSchema = zod_1.z.object({
    scope: ScopeEnum.default('Step'),
    formSelection: FormSelectionEnum.default('Latest'),
    language: LanguageEnum.default('English'),
    includeDescriptions: zod_1.z.boolean().optional().default(true),
    includeMissingAnswers: zod_1.z.boolean().optional().default(true),
    separator: zod_1.z.string().optional(),
});
//# sourceMappingURL=fields.js.map