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

    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 HtmlTagAttrs) 
            return val;
        if(typeof val === 'string' || val instanceof String) {
            val = val.toUpperCase();
            if(HtmlTagAttrs.mapStringToEnum.containsKey(val))
                return HtmlTagAttrs.mapStringToEnum.get(val);
            return null;
        }
        if(HtmlTagAttrs.mapIntToEnum.containsKey(val))
            return HtmlTagAttrs.mapIntToEnum.get(val);
        let it = new HtmlTagAttrs(val, val.toString());
        HtmlTagAttrs.mapIntToEnum.put(val, it);
        HtmlTagAttrs.mapStringToEnum.put(val.toString(), it);
        return it;
    }
    static isDefined(val) {
        return HtmlTagAttrs.m_Keys.indexOf(val) >= 0;
    }
    static getValues() {
        return HtmlTagAttrs.m_Values;
    }
    static static_constructor() {
        HtmlTagAttrs.mapIntToEnum = new Hashtable();
        HtmlTagAttrs.mapStringToEnum = new Hashtable();
        HtmlTagAttrs.INLINE = new HtmlTagAttrs(1, "INLINE");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.INLINE.value(), HtmlTagAttrs.INLINE); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.INLINE.m_str.toUpperCase(), HtmlTagAttrs.INLINE); 
        HtmlTagAttrs.BLOCK = new HtmlTagAttrs(2, "BLOCK");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.BLOCK.value(), HtmlTagAttrs.BLOCK); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.BLOCK.m_str.toUpperCase(), HtmlTagAttrs.BLOCK); 
        HtmlTagAttrs.TABLEITEM = new HtmlTagAttrs(4, "TABLEITEM");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.TABLEITEM.value(), HtmlTagAttrs.TABLEITEM); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.TABLEITEM.m_str.toUpperCase(), HtmlTagAttrs.TABLEITEM); 
        HtmlTagAttrs.CONTROL = new HtmlTagAttrs(8, "CONTROL");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.CONTROL.value(), HtmlTagAttrs.CONTROL); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.CONTROL.m_str.toUpperCase(), HtmlTagAttrs.CONTROL); 
        HtmlTagAttrs.IGNORETHIS = new HtmlTagAttrs(0x10, "IGNORETHIS");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.IGNORETHIS.value(), HtmlTagAttrs.IGNORETHIS); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.IGNORETHIS.m_str.toUpperCase(), HtmlTagAttrs.IGNORETHIS); 
        HtmlTagAttrs.IGNOREWITHCONTENT = new HtmlTagAttrs(0x20, "IGNOREWITHCONTENT");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.IGNOREWITHCONTENT.value(), HtmlTagAttrs.IGNOREWITHCONTENT); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.IGNOREWITHCONTENT.m_str.toUpperCase(), HtmlTagAttrs.IGNOREWITHCONTENT); 
        HtmlTagAttrs.EMPTY = new HtmlTagAttrs(0x40, "EMPTY");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.EMPTY.value(), HtmlTagAttrs.EMPTY); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.EMPTY.m_str.toUpperCase(), HtmlTagAttrs.EMPTY); 
        HtmlTagAttrs.ENDTAGREQ = new HtmlTagAttrs(0x80, "ENDTAGREQ");
        HtmlTagAttrs.mapIntToEnum.put(HtmlTagAttrs.ENDTAGREQ.value(), HtmlTagAttrs.ENDTAGREQ); 
        HtmlTagAttrs.mapStringToEnum.put(HtmlTagAttrs.ENDTAGREQ.m_str.toUpperCase(), HtmlTagAttrs.ENDTAGREQ); 
        HtmlTagAttrs.m_Values = Array.from(HtmlTagAttrs.mapIntToEnum.values);
        HtmlTagAttrs.m_Keys = Array.from(HtmlTagAttrs.mapIntToEnum.keys);
    }
}


HtmlTagAttrs.static_constructor();

module.exports = HtmlTagAttrs