/*
 * 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");

// Determines how entries are tested to see if they should use Zip64 extensions or not.
class UseZip64 {

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


UseZip64.static_constructor();

module.exports = UseZip64