package com.ruoyi.web.modules.booking.support;

import com.ruoyi.web.modules.diagnosis.support.ServiceAppointmentRules;

/**
 * 我的预约 — 状态展示文案。
 */
public final class MyAppointmentStatusLabelResolver
{
    private MyAppointmentStatusLabelResolver()
    {
    }

    public static String resolve(int providerType, int status)
    {
        if (providerType == ServiceAppointmentRules.PROVIDER_TYPE_ORG)
        {
            return resolveOrg(status);
        }
        return resolveVetOrExpert(status);
    }

    private static String resolveOrg(int status)
    {
        switch (status)
        {
            case ServiceAppointmentRules.STATUS_BOOKED:
                return "已预约";
            case ServiceAppointmentRules.STATUS_CANCELLED:
                return "已取消";
            case ServiceAppointmentRules.STATUS_COMPLETED:
                return "已完成";
            default:
                return "未知";
        }
    }

    private static String resolveVetOrExpert(int status)
    {
        switch (status)
        {
            case ServiceAppointmentRules.STATUS_PENDING:
                return "待确认";
            case ServiceAppointmentRules.STATUS_CONFIRMED:
                return "已确认";
            case ServiceAppointmentRules.STATUS_REJECTED:
                return "已拒绝";
            case ServiceAppointmentRules.STATUS_CANCELLED:
                return "已取消";
            case ServiceAppointmentRules.STATUS_COMPLETED:
                return "已完成";
            case ServiceAppointmentRules.STATUS_BOOKED:
                return "已预约";
            default:
                return "未知";
        }
    }
}
