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

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


UnitextPagesectionItemPages.static_constructor();

module.exports = UnitextPagesectionItemPages