import ModelDictionary from "../Data/ModelDictionary.js";
export var ContextAttributeKey;
(function (ContextAttributeKey) {
    ContextAttributeKey["ChangeSource"] = "changeSource";
    ContextAttributeKey["LabelResizePosition"] = "labelResizePosition";
    ContextAttributeKey["DescriptionResizePosition"] = "descriptionResizePosition";
    ContextAttributeKey["FilterTerm"] = "filterTerm";
})(ContextAttributeKey || (ContextAttributeKey = {}));
export default class ContextAttributes extends ModelDictionary {
    get hasChangeSource() {
        return this.get(ContextAttributeKey.ChangeSource) != null;
    }
    get changeSource() {
        let result = this.get(ContextAttributeKey.ChangeSource);
        return _.isString(result) ? {
            id: result.split("|")[0],
            name: result.split("|")[1]
        } : result;
    }
    set changeSource(value) {
        this.set(ContextAttributeKey.ChangeSource, value);
    }
    get labelResizePosition() {
        return this.get(ContextAttributeKey.LabelResizePosition);
    }
    set labelResizePosition(value) {
        this.set(ContextAttributeKey.LabelResizePosition, value);
    }
    get descriptionResizePosition() {
        return this.get(ContextAttributeKey.DescriptionResizePosition);
    }
    set descriptionResizePosition(value) {
        this.set(ContextAttributeKey.DescriptionResizePosition, value);
    }
    get filterTerm() {
        return this.get(ContextAttributeKey.FilterTerm);
    }
    set filterTerm(value) {
        this.set(ContextAttributeKey.FilterTerm, value);
    }
    deleteChangeSource() {
        this.delete(ContextAttributeKey.ChangeSource);
    }
}
