"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.processAttendeeOptions = processAttendeeOptions;
const types_1 = require("../../../events/api/types");
function processAttendeeOptions(options) {
    const processedOptions = {};
    if (options.num > 0) {
        processedOptions.num = options.num.toString();
    }
    if (options.start > 1) {
        processedOptions.start = options.start.toString();
    }
    if (options.sortField === "modified") {
        processedOptions.sortBy = types_1.RegistrationSort.updatedAt;
    }
    else if (options.sortField === "created") {
        processedOptions.sortBy = types_1.RegistrationSort.createdAt;
    }
    else if (options.sortField === "username") {
        processedOptions.sortBy = types_1.RegistrationSort.username;
    }
    else if (options.sortField === "firstName") {
        processedOptions.sortBy = types_1.RegistrationSort.firstName;
    }
    else if (options.sortField === "lastName") {
        processedOptions.sortBy = types_1.RegistrationSort.lastName;
    }
    processedOptions.sortOrder =
        options.sortOrder === "desc" ? types_1.EventSortOrder.desc : types_1.EventSortOrder.asc;
    return processedOptions;
}
//# sourceMappingURL=processAttendeeOptions.js.map