package cz.moneta.test.dsl.hypos.enums;

import java.util.stream.Stream;

public enum HyposAction {
    FINANSO("Finanso"),
    REFINANSO("Refinanso"),
    EMPLOYEE_FLEXIBLE_MORTGAGE("Zaměstnanec - Hypoteční úvěr na bydlení 80"),
    EMPLOYEE_AMERICAN_MORTGAGE("Zaměstnanec - Americká HY"),
    EMPLOYEE_VARIABLE_MORTGAGE("Zaměstnanec - Hypotéka s variabilní sazbou 80"),
    BUSINESS_MORTGAGE("Živnostenská hypotéka"),
    WITHOUT_ACTION("--");

    private final String hyposAction;

    HyposAction(String hyposAction) {
        this.hyposAction = hyposAction;
    }

    public String getValue() {
        return hyposAction;
    }

    public static boolean isActionEmployee(String action) {
        return Stream.of(EMPLOYEE_FLEXIBLE_MORTGAGE, EMPLOYEE_AMERICAN_MORTGAGE, EMPLOYEE_VARIABLE_MORTGAGE)
                .anyMatch(a -> a.getValue().equals(action));
    }
}