/*
 * 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 Utils = require("./../../../unisharp/Utils");
const RefOutArgWrapper = require("./../../../unisharp/RefOutArgWrapper");

const SinglePropertyModifiers = require("./SinglePropertyModifiers");

class Sprm {
    
    get ispmd() {
        return ((this.sprm) & 0x1FF);
    }
    
    get fSpec() {
        return (((this.sprm) & 0x200)) !== 0;
    }
    
    get sgc() {
        return ((((this.sprm) >>> 10)) & 0x07);
    }
    
    get spra() {
        return ((((this.sprm) >>> 13)) & 0x07);
    }
    
    constructor(_sprm = 0) {
        this.sprm = 0;
        this.sprm = _sprm;
    }
    
    toString() {
        let sprmName = null;
        let wrapsprmName535 = new RefOutArgWrapper();
        let inoutres536 = SinglePropertyModifiers.map.tryGetValue(this.sprm, wrapsprmName535);
        sprmName = wrapsprmName535.value;
        if (inoutres536) 
            return sprmName;
        else 
            return "sprm: 0x" + Utils.correctToString((this.sprm).toString(16).toUpperCase(), 4, false);
    }
}


module.exports = Sprm