"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']);
const statusEnum = zod_1.z.enum([
    'new',
    'open',
    'pending',
    'hold',
    'solved',
    'closed',
]);
exports.fields = {
    ticket_id: {
        label: 'Ticket ID',
        id: 'ticket_id',
        type: extensions_core_1.FieldType.NUMERIC,
        required: true,
        description: 'The ID of the ticket to update.',
    },
    comment: {
        label: 'Comment',
        id: 'comment',
        type: extensions_core_1.FieldType.STRING,
        stringType: extensions_core_1.StringType.TEXT,
        required: false,
        description: 'Add a comment to the ticket.',
    },
    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((priority) => ({
                label: priority,
                value: priority,
            })),
        },
    },
    status: {
        label: 'Status',
        id: 'status',
        type: extensions_core_1.FieldType.STRING,
        required: false,
        description: 'The status: new, open, pending, hold, solved, or closed.',
        options: {
            dropdownOptions: Object.values(statusEnum.enum).map((status) => ({
                label: status,
                value: status,
            })),
        },
    },
};
exports.FieldsValidationSchema = zod_1.z.object({
    ticket_id: zod_1.z.string().nonempty(),
    comment: zod_1.z.string().optional(),
    priority: (0, extensions_core_1.makeStringOptional)(priorityEnum),
    status: (0, extensions_core_1.makeStringOptional)(statusEnum),
});
//# sourceMappingURL=fields.js.map