/*
 * 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 HtmlParserNodeTagTypes {

    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 HtmlParserNodeTagTypes) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(HtmlParserNodeTagTypes.mapStringToEnum.containsKey(val))
                return HtmlParserNodeTagTypes.mapStringToEnum.get(val);
            return null;
        }
        if(HtmlParserNodeTagTypes.mapIntToEnum.containsKey(val))
            return HtmlParserNodeTagTypes.mapIntToEnum.get(val);
        let it = new HtmlParserNodeTagTypes(val, val.toString());
        HtmlParserNodeTagTypes.mapIntToEnum.put(val, it);
        HtmlParserNodeTagTypes.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return HtmlParserNodeTagTypes.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return HtmlParserNodeTagTypes.m_Values;
    }
    static static_constructor() {
        HtmlParserNodeTagTypes.mapIntToEnum = new Hashtable();
        HtmlParserNodeTagTypes.mapStringToEnum = new Hashtable();
        HtmlParserNodeTagTypes.UNDEFINED = new HtmlParserNodeTagTypes(0, "UNDEFINED");
        HtmlParserNodeTagTypes.mapIntToEnum.put(HtmlParserNodeTagTypes.UNDEFINED.value(), HtmlParserNodeTagTypes.UNDEFINED); 
        HtmlParserNodeTagTypes.mapStringToEnum.put(HtmlParserNodeTagTypes.UNDEFINED.m_str.toUpperCase(), HtmlParserNodeTagTypes.UNDEFINED); 
        HtmlParserNodeTagTypes.OPEN = new HtmlParserNodeTagTypes(1, "OPEN");
        HtmlParserNodeTagTypes.mapIntToEnum.put(HtmlParserNodeTagTypes.OPEN.value(), HtmlParserNodeTagTypes.OPEN); 
        HtmlParserNodeTagTypes.mapStringToEnum.put(HtmlParserNodeTagTypes.OPEN.m_str.toUpperCase(), HtmlParserNodeTagTypes.OPEN); 
        HtmlParserNodeTagTypes.CLOSE = new HtmlParserNodeTagTypes(2, "CLOSE");
        HtmlParserNodeTagTypes.mapIntToEnum.put(HtmlParserNodeTagTypes.CLOSE.value(), HtmlParserNodeTagTypes.CLOSE); 
        HtmlParserNodeTagTypes.mapStringToEnum.put(HtmlParserNodeTagTypes.CLOSE.m_str.toUpperCase(), HtmlParserNodeTagTypes.CLOSE); 
        HtmlParserNodeTagTypes.OPENCLOSE = new HtmlParserNodeTagTypes(3, "OPENCLOSE");
        HtmlParserNodeTagTypes.mapIntToEnum.put(HtmlParserNodeTagTypes.OPENCLOSE.value(), HtmlParserNodeTagTypes.OPENCLOSE); 
        HtmlParserNodeTagTypes.mapStringToEnum.put(HtmlParserNodeTagTypes.OPENCLOSE.m_str.toUpperCase(), HtmlParserNodeTagTypes.OPENCLOSE); 
        HtmlParserNodeTagTypes.m_Values = Array.from(HtmlParserNodeTagTypes.mapIntToEnum.values);
        HtmlParserNodeTagTypes.m_Keys = Array.from(HtmlParserNodeTagTypes.mapIntToEnum.keys);
    }
}


HtmlParserNodeTagTypes.static_constructor();

module.exports = HtmlParserNodeTagTypes