/*
 * SDK Pullenti Lingvo, 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#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


const ReferentClass = require("./../../metadata/ReferentClass");
const DecreeKind = require("./../DecreeKind");
const Referent = require("./../../Referent");

class MetaDecree extends ReferentClass {
    
    static initialize() {
        const DecreeReferent = require("./../DecreeReferent");
        MetaDecree.GLOBAL_META = new MetaDecree();
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_TYPE, "Тип", 1, 1);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_NUMBER, "Номер", 0, 0);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_CASENUMBER, "Номер дела", 0, 0);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_DATE, "Дата", 0, 0);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_SOURCE, "Источник", 0, 1);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_GEO, "Географический объект", 0, 1);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_NAME, "Наименование", 0, 0);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_READING, "Чтение", 0, 1);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_EDITION, "В редакции", 0, 0);
        MetaDecree.GLOBAL_META.addFeature(DecreeReferent.ATTR_OWNER, "Утвердивший НПА", 0, 1);
        MetaDecree.GLOBAL_META.addFeature(Referent.ATTR_GENERAL, "Обобщающий объект", 0, 1);
    }
    
    get name() {
        const DecreeReferent = require("./../DecreeReferent");
        return DecreeReferent.OBJ_TYPENAME;
    }
    
    get caption() {
        return "Декрет";
    }
    
    getImageId(obj = null) {
        const DecreeReferent = require("./../DecreeReferent");
        if (obj instanceof DecreeReferent) {
            let ki = obj.kind;
            if (ki === DecreeKind.PUBLISHER) 
                return MetaDecree.PUBLISH_IMAGE_ID;
            if (ki === DecreeKind.STANDARD || ki === DecreeKind.CLASSIFIER) 
                return MetaDecree.STANDADR_IMAGE_ID;
        }
        return MetaDecree.DECREE_IMAGE_ID;
    }
    
    static static_constructor() {
        MetaDecree.DECREE_IMAGE_ID = "decree";
        MetaDecree.PUBLISH_IMAGE_ID = "publish";
        MetaDecree.STANDADR_IMAGE_ID = "decreestd";
        MetaDecree.GLOBAL_META = null;
    }
}


MetaDecree.static_constructor();

module.exports = MetaDecree