package com.jachdev.consumerprotection.data.enums;

import com.jachdev.consumerprotection.AppConstant;

/**
 * Created by Charitha Ratnayake(charitha.r@eyepax.com) on 3/20/2022.
 */
public enum  TestReportType {

    GLUCOSE(0, AppConstant.ImageExtractor.KEY_GLUCOSE),
    CHOLESTEROL(1, AppConstant.ImageExtractor.KEY_CHOLESTEROL),
    HDL(2, AppConstant.ImageExtractor.KEY_HDL),
    LDL(3, AppConstant.ImageExtractor.KEY_LDL);

    TestReportType(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int id;
    public String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMin(){
        int min = 0;
        switch (this){
            case GLUCOSE:
                min = AppConstant.ImageExtractor.MIN_GLU;
                break;
            case CHOLESTEROL:
                min = AppConstant.ImageExtractor.MIN_CHOL;
                break;
            case HDL:
                min = AppConstant.ImageExtractor.MIN_HDL;
                break;
            case LDL:
                min = AppConstant.ImageExtractor.MIN_LDL;
                break;
        }
        return min;
    }

    public int getMax(){
        int max = 0;
        switch (this){
            case GLUCOSE:
                max = AppConstant.ImageExtractor.MAX_GLU;
                break;
            case CHOLESTEROL:
                max = AppConstant.ImageExtractor.MAX_CHOL;
                break;
            case HDL:
                max = AppConstant.ImageExtractor.MAX_HDL;
                break;
            case LDL:
                max = AppConstant.ImageExtractor.MAX_LDL;
                break;
        }
        return max;
    }
}
