package com.vetti.common.enums;

public enum RoleBenefitsEnum {

    health_insurance("health_insurance", "health insurance"),
    paid_time_off("paid_time_off", "paid time off"),
    flexible_work_schedule("flexible_work_schedule", "flexible work schedule"),
    professional_development_budget("professional_development_budget", "professional development budget"),
    performance_bonuses("performance_bonuses", "performance bonuses"),
    wellness_program("wellness_program", "wellness program"),
    stock_options("stock_options", "stock options/esop"),
    relocation_support("relocation_support", "relocation support"),
    parental_leave("parental_leave", "parental leave"),
    team_events_corporate_activities("team_events_corporate_activities", "team events & corporate activities"),
    ;

    private final String code;
    private final String info;

    RoleBenefitsEnum(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static RoleBenefitsEnum getByInfo(String code) {
        RoleBenefitsEnum[] entityEnums = values();
        for (RoleBenefitsEnum entityEnum : entityEnums) {
            if (entityEnum.getCode().equals(code)) {
                return entityEnum;
            }
        }
        return null;
    }

    public static RoleBenefitsEnum getByCode(String info) {
        RoleBenefitsEnum[] entityEnums = values();
        for (RoleBenefitsEnum entityEnum : entityEnums) {
            if (entityEnum.getInfo().equals(info.toLowerCase())) {
                return entityEnum;
            }
        }
        return null;
    }

}
