package com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes;

import java.util.Locale;

public enum ImageType {
    LOGO,
    FORMULA,
    SIGNATURE,

    SIGNATURE_VISUAL,
    OTHER,
    OCR,
    GRAPHIC;


    public static ImageType fromString(String imageType) {

        return switch (imageType.toLowerCase(Locale.ROOT)) {
            case "logo" -> ImageType.LOGO;
            case "formula" -> ImageType.FORMULA;
            case "signature" -> ImageType.SIGNATURE;
            case "ocr" -> ImageType.OCR;
            case "graphic" -> ImageType.GRAPHIC;
            default -> ImageType.OTHER;
        };
    }
}
