package epson.common;

import epson.print.CommonDefine;

public enum ExtType {
    FileType_JPG(".jpg"),
    FileType_PDF(CommonDefine.FileType_PDF),
    FileType_WORD_1(CommonDefine.FileType_WORD_1),
    FileType_WORD_2(CommonDefine.FileType_WORD_2),
    FileType_EXCEL_1(CommonDefine.FileType_EXCEL_1),
    FileType_EXCEL_2(CommonDefine.FileType_EXCEL_2),
    FileType_POWERPOINT_1(CommonDefine.FileType_POWERPOINT_1),
    FileType_POWERPOINT_2(CommonDefine.FileType_POWERPOINT_2),
    FileType_TXT(CommonDefine.FileType_TXT),
    FileType_RTF(CommonDefine.FileType_RTF),
    FileType_CSV(CommonDefine.FileType_CSV),
    FileType_HTML_1(CommonDefine.FileType_HTML_1),
    FileType_HTML_2(CommonDefine.FileType_HTML_2),
    FileType_JPEG(".jpeg"),
    FileType_PNG(".png"),
    FileType_BMP(".bmp"),
    FileType_HEIF(CommonDefine.FileType_HEIF),
    UNKNOWN_TYPE("");

    private final String name;

    private ExtType(String str) {
        name = str;
    }

    public String toString() {
        return name;
    }

    public static ExtType toExtType(String str) {
        ExtType extType;
        ExtType[] values = values();
        int length = values.length;
        int i = 0;
        while (true) {
            if (i >= length) {
                extType = null;
                break;
            }
            extType = values[i];
            if (extType.toString().equals(str)) {
                break;
            }
            i++;
        }
        return extType != null ? extType : UNKNOWN_TYPE;
    }
}
