let _parentNode;
export default class Style extends Object {
    constructor(parentNode) {
        super();
        _parentNode = parentNode;
    }
    setProperty(propertyName, value, priority) {
        if (priority === "important") {
            this[propertyName] = value + "!important";
        }
        else {
            this[propertyName] = value;
        }
        if (Object.keys(this).length > 0) {
            _parentNode === null || _parentNode === void 0 ? void 0 : _parentNode.setAttribute("style", `${Object.keys(this).map(key => [key, this[key]].join(": ")).join("; ")};`);
        }
    }
    getPropertyValue(propertyName) {
        if (typeof this[propertyName] === "string") {
            return this[propertyName];
        }
        else {
            return "";
        }
    }
    getPropertyPriority(propertyName) {
        if (this.getPropertyValue(propertyName).includes("important")) {
            return "important";
        }
        else {
            return "";
        }
    }
}
//# sourceMappingURL=style.js.map