"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAppointmentCountsByStatus = void 0;
const appointment_zod_1 = require("../../validation/appointment.zod");
const getAppointmentCountsByStatus = (appointments) => {
    return Object.values(appointment_zod_1.statusEnum.Values).reduce((acc, status) => {
        const cnt = appointments.filter((appointment) => (appointment === null || appointment === void 0 ? void 0 : appointment.status.status) === status).length;
        if (cnt > 0) {
            acc[status] = cnt;
        }
        return acc;
    }, {});
};
exports.getAppointmentCountsByStatus = getAppointmentCountsByStatus;
//# sourceMappingURL=getAppointmentCountByStatus.js.map