"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const zod_1 = require("zod");
const extensions_core_1 = require("@awell-health/extensions-core");
const priorityEnum = zod_1.z.enum(['urgent', 'high', 'normal', 'low']);
exports.fields = {
    subject: {
        label: 'Subject',
        id: 'subject',
        type: extensions_core_1.FieldType.STRING,
        stringType: extensions_core_1.StringType.TEXT,
        required: true,
        description: 'The subject line of the ticket.',
    },
    comment: {
        label: 'Comment',
        id: 'comment',
        type: extensions_core_1.FieldType.STRING,
        stringType: extensions_core_1.StringType.TEXT,
        required: true,
        description: 'The initial comment/description for the ticket.',
    },
    group_id: {
        label: 'Group ID',
        id: 'group_id',
        type: extensions_core_1.FieldType.NUMERIC,
        required: false,
        description: 'The ID of the group to assign the ticket to.',
    },
    priority: {
        label: 'Priority',
        id: 'priority',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        description: 'The priority level: urgent, high, normal, or low.',
        options: {
            dropdownOptions: Object.values(priorityEnum.enum).map((status) => ({
                label: status,
                value: status,
            })),
        },
    },
    external_id: {
        label: 'External ID',
        id: 'external_id',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        description: 'An external identifier to link this ticket to your system.',
    },
    tag: {
        label: 'Tag',
        id: 'tag',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        description: 'A tag to add to the ticket.',
    },
};
exports.FieldsValidationSchema = zod_1.z.object({
    subject: zod_1.z.string().nonempty(),
    comment: zod_1.z.string().nonempty(),
    group_id: (0, extensions_core_1.makeStringOptional)(extensions_core_1.NumericIdSchema),
    priority: (0, extensions_core_1.makeStringOptional)(priorityEnum),
    external_id: zod_1.z.string().optional(),
    tag: zod_1.z.string().optional(),
});
//# sourceMappingURL=fields.js.map