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

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


LocCorrTyp.static_constructor();

module.exports = LocCorrTyp