/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Hashtable = require("./../../../unisharp/Hashtable");

class TiffHelperCCITT_Types {

    constructor(val, str) {
        this.m_val = val;
        this.m_str = str;
    }
    toString() {
        return this.m_str;
    }
    value() {
        return this.m_val;
    }
    static of(val) {
        if(val instanceof TiffHelperCCITT_Types) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(TiffHelperCCITT_Types.mapStringToEnum.containsKey(val))
                return TiffHelperCCITT_Types.mapStringToEnum.get(val);
            return null;
        }
        if(TiffHelperCCITT_Types.mapIntToEnum.containsKey(val))
            return TiffHelperCCITT_Types.mapIntToEnum.get(val);
        let it = new TiffHelperCCITT_Types(val, val.toString());
        TiffHelperCCITT_Types.mapIntToEnum.put(val, it);
        TiffHelperCCITT_Types.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return TiffHelperCCITT_Types.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return TiffHelperCCITT_Types.m_Values;
    }
    static static_constructor() {
        TiffHelperCCITT_Types.mapIntToEnum = new Hashtable();
        TiffHelperCCITT_Types.mapStringToEnum = new Hashtable();
        TiffHelperCCITT_Types.G3_1D = new TiffHelperCCITT_Types(2, "G3_1D");
        TiffHelperCCITT_Types.mapIntToEnum.put(TiffHelperCCITT_Types.G3_1D.value(), TiffHelperCCITT_Types.G3_1D); 
        TiffHelperCCITT_Types.mapStringToEnum.put(TiffHelperCCITT_Types.G3_1D.m_str.toUpperCase(), TiffHelperCCITT_Types.G3_1D); 
        TiffHelperCCITT_Types.G3_2D = new TiffHelperCCITT_Types(3, "G3_2D");
        TiffHelperCCITT_Types.mapIntToEnum.put(TiffHelperCCITT_Types.G3_2D.value(), TiffHelperCCITT_Types.G3_2D); 
        TiffHelperCCITT_Types.mapStringToEnum.put(TiffHelperCCITT_Types.G3_2D.m_str.toUpperCase(), TiffHelperCCITT_Types.G3_2D); 
        TiffHelperCCITT_Types.G4 = new TiffHelperCCITT_Types(4, "G4");
        TiffHelperCCITT_Types.mapIntToEnum.put(TiffHelperCCITT_Types.G4.value(), TiffHelperCCITT_Types.G4); 
        TiffHelperCCITT_Types.mapStringToEnum.put(TiffHelperCCITT_Types.G4.m_str.toUpperCase(), TiffHelperCCITT_Types.G4); 
        TiffHelperCCITT_Types.m_Values = Array.from(TiffHelperCCITT_Types.mapIntToEnum.values);
        TiffHelperCCITT_Types.m_Keys = Array.from(TiffHelperCCITT_Types.mapIntToEnum.keys);
    }
}


TiffHelperCCITT_Types.static_constructor();

module.exports = TiffHelperCCITT_Types