import * as tslib_1 from "tslib";
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { HorizontalAlignment, HorizontalAlignment_$type } from "igniteui-angular-core";
import { VerticalAlignment, VerticalAlignment_$type } from "igniteui-angular-core";
import { TreemapNodeStyle } from "./TreemapNodeStyle";
import { TypeRegistrar } from "igniteui-angular-core";
import { NamePatcher, brushToString, stringToBrush, ensureEnum, toSpinal, initializePropertiesFromCss } from "igniteui-angular-core";
/**
 * Represents a style to apply to a treemap node.
*/
export var IgxTreemapNodeStyleComponent_PROVIDERS = [];
var IgxTreemapNodeStyleComponent = /** @class */ (function () {
    function IgxTreemapNodeStyleComponent() {
        this.__p = null;
        this._hasUserValues = new Set();
        this._stylingContainer = null;
        this._stylingParent = null;
        this._inStyling = false;
        if (this._styling) {
            NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
        }
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgxTreemapNodeStyleComponent.prototype.createImplementation = function () {
        return new TreemapNodeStyle();
    };
    IgxTreemapNodeStyleComponent.prototype.ngOnInit = function () {
    };
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        } /**
                                     * @hidden
                                     */,
        enumerable: true,
        configurable: true
    });
    IgxTreemapNodeStyleComponent._createFromInternal = function (internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        var name = internal.$type.name;
        var externalName = "Igx" + name + "Component";
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    };
    IgxTreemapNodeStyleComponent.prototype.onImplementationCreated = function () {
    };
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerHoverBackground", {
        /**
         * Gets or sets the background to use for the header when it is hovered.
        */
        get: function () {
            return brushToString(this.i.a7);
        },
        set: function (v) {
            this.i.a7 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerBackground", {
        /**
         * Gets or sets the background to use for the header.
        */
        get: function () {
            return brushToString(this.i.a6);
        },
        set: function (v) {
            this.i.a6 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerTextColor", {
        /**
         * Gets or sets the text color to use for the header.
        */
        get: function () {
            return brushToString(this.i.a9);
        },
        set: function (v) {
            this.i.a9 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "label", {
        /**
         * Gets or sets the label to use for the node.
        */
        get: function () {
            return this.i.ai;
        },
        set: function (v) {
            this.i.ai = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "textColor", {
        /**
         * Gets or sets the text color to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.bb);
        },
        set: function (v) {
            this.i.bb = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerHoverTextColor", {
        /**
         * Gets or sets the text color to use for the header.
        */
        get: function () {
            return brushToString(this.i.a8);
        },
        set: function (v) {
            this.i.a8 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerLabelLeftMargin", {
        /**
         * Gets or sets the left margin to use for the header.
        */
        get: function () {
            return this.i.p;
        },
        set: function (v) {
            this.i.p = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerLabelTopMargin", {
        /**
         * Gets or sets the top margin to use for the header.
        */
        get: function () {
            return this.i.r;
        },
        set: function (v) {
            this.i.r = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerLabelRightMargin", {
        /**
         * Gets or sets the right margin to use for the header.
        */
        get: function () {
            return this.i.q;
        },
        set: function (v) {
            this.i.q = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerLabelBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the labels.
        */
        get: function () {
            return this.i.o;
        },
        set: function (v) {
            this.i.o = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelLeftMargin", {
        /**
         * Gets or sets the left margin to use for the labels.
        */
        get: function () {
            return this.i.t;
        },
        set: function (v) {
            this.i.t = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelTopMargin", {
        /**
         * Gets or sets the top margin to use for the labels.
        */
        get: function () {
            return this.i.v;
        },
        set: function (v) {
            this.i.v = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelRightMargin", {
        /**
         * Gets or sets the right margin to use for the labels.
        */
        get: function () {
            return this.i.u;
        },
        set: function (v) {
            this.i.u = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the labels.
        */
        get: function () {
            return this.i.s;
        },
        set: function (v) {
            this.i.s = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "headerHeight", {
        /**
         * Gets or sets the height to use for the header.
        */
        get: function () {
            return this.i.n;
        },
        set: function (v) {
            this.i.n = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment to use for the node labels.
        */
        get: function () {
            return this.i.ax;
        },
        set: function (v) {
            this.i.ax = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "labelVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment to use for the node labels.
        */
        get: function () {
            return this.i.bd;
        },
        set: function (v) {
            this.i.bd = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "fill", {
        /**
         * Gets or sets the fill color to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.a5);
        },
        set: function (v) {
            this.i.a5 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "outline", {
        /**
         * Gets or sets the outline to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.ba);
        },
        set: function (v) {
            this.i.ba = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "strokeThickness", {
        /**
         * Gets or sets the stroke thickness to use for the node outline.
        */
        get: function () {
            return this.i.w;
        },
        set: function (v) {
            this.i.w = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxTreemapNodeStyleComponent.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: true,
        configurable: true
    });
    IgxTreemapNodeStyleComponent.prototype.__m = function (propertyName) {
        if (!this._inStyling) {
            this._hasUserValues.add(propertyName);
        }
    };
    IgxTreemapNodeStyleComponent.prototype._styling = function (container, component, parent) {
        if (this._inStyling) {
            return;
        }
        this._inStyling = true;
        this._stylingContainer = container;
        this._stylingParent = component;
        var genericPrefix = "";
        var typeName = this.i.$type.name;
        if (typeName.indexOf("Xam") === 0) {
            typeName = typeName.substring(3);
        }
        genericPrefix = toSpinal("TreemapNodeStyleComponent");
        var additionalPrefixes = [];
        var prefix = toSpinal(typeName);
        additionalPrefixes.push(prefix + "-");
        var b = this.i.$type.baseType;
        while (b && b.name != "Object" &&
            b.name != "Base" &&
            b.name != "Control" &&
            b.Name != "DependencyObject" &&
            b.Name != "FrameworkElement") {
            typeName = b.name;
            if (typeName.indexOf("Xam") === 0) {
                typeName = typeName.substring(3);
            }
            var basePrefix = toSpinal(typeName);
            additionalPrefixes.push(basePrefix + "-");
            b = b.baseType;
        }
        if (parent) {
            var parentTypeName = parent.i.$type.name;
            if (parentTypeName.indexOf("Xam") === 0) {
                parentTypeName = parentTypeName.substring(3);
            }
            var parentPrefix = toSpinal(parentTypeName);
            additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
            additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
        }
        initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
        if (this._otherStyling) {
            this._otherStyling(container, component, parent);
        }
        this._inStyling = false;
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "headerHoverBackground", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "headerBackground", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "headerTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "label", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "textColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "headerHoverTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "headerLabelLeftMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "headerLabelTopMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "headerLabelRightMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "headerLabelBottomMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelLeftMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelTopMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelRightMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelBottomMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "headerHeight", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelHorizontalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "labelVerticalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "fill", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxTreemapNodeStyleComponent.prototype, "outline", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxTreemapNodeStyleComponent.prototype, "strokeThickness", null);
    IgxTreemapNodeStyleComponent = tslib_1.__decorate([
        Component({
            selector: 'igx-treemap-node-style',
            template: "",
            providers: [],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxTreemapNodeStyleComponent);
    return IgxTreemapNodeStyleComponent;
}());
export { IgxTreemapNodeStyleComponent };
//# sourceMappingURL=igx-treemap-node-style-component.js.map