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 const IgxTreemapNodeStyleComponent_PROVIDERS = [];
let IgxTreemapNodeStyleComponent = class IgxTreemapNodeStyleComponent {
    constructor() {
        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();
    }
    createImplementation() {
        return new TreemapNodeStyle();
    }
    ngOnInit() {
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    } /**
                                 * @hidden
                                 */
    static _createFromInternal(internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        let name = internal.$type.name;
        let externalName = "Igx" + name + "Component";
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    }
    onImplementationCreated() {
    }
    /**
     * Gets or sets the background to use for the header when it is hovered.
    */
    get headerHoverBackground() {
        return brushToString(this.i.a7);
    }
    set headerHoverBackground(v) {
        this.i.a7 = stringToBrush(v);
    }
    /**
     * Gets or sets the background to use for the header.
    */
    get headerBackground() {
        return brushToString(this.i.a6);
    }
    set headerBackground(v) {
        this.i.a6 = stringToBrush(v);
    }
    /**
     * Gets or sets the text color to use for the header.
    */
    get headerTextColor() {
        return brushToString(this.i.a9);
    }
    set headerTextColor(v) {
        this.i.a9 = stringToBrush(v);
    }
    /**
     * Gets or sets the label to use for the node.
    */
    get label() {
        return this.i.ai;
    }
    set label(v) {
        this.i.ai = v;
    }
    /**
     * Gets or sets the text color to use for the nodes.
    */
    get textColor() {
        return brushToString(this.i.bb);
    }
    set textColor(v) {
        this.i.bb = stringToBrush(v);
    }
    /**
     * Gets or sets the text color to use for the header.
    */
    get headerHoverTextColor() {
        return brushToString(this.i.a8);
    }
    set headerHoverTextColor(v) {
        this.i.a8 = stringToBrush(v);
    }
    /**
     * Gets or sets the left margin to use for the header.
    */
    get headerLabelLeftMargin() {
        return this.i.p;
    }
    set headerLabelLeftMargin(v) {
        this.i.p = +v;
    }
    /**
     * Gets or sets the top margin to use for the header.
    */
    get headerLabelTopMargin() {
        return this.i.r;
    }
    set headerLabelTopMargin(v) {
        this.i.r = +v;
    }
    /**
     * Gets or sets the right margin to use for the header.
    */
    get headerLabelRightMargin() {
        return this.i.q;
    }
    set headerLabelRightMargin(v) {
        this.i.q = +v;
    }
    /**
     * Gets or sets the bottom margin to use for the labels.
    */
    get headerLabelBottomMargin() {
        return this.i.o;
    }
    set headerLabelBottomMargin(v) {
        this.i.o = +v;
    }
    /**
     * Gets or sets the left margin to use for the labels.
    */
    get labelLeftMargin() {
        return this.i.t;
    }
    set labelLeftMargin(v) {
        this.i.t = +v;
    }
    /**
     * Gets or sets the top margin to use for the labels.
    */
    get labelTopMargin() {
        return this.i.v;
    }
    set labelTopMargin(v) {
        this.i.v = +v;
    }
    /**
     * Gets or sets the right margin to use for the labels.
    */
    get labelRightMargin() {
        return this.i.u;
    }
    set labelRightMargin(v) {
        this.i.u = +v;
    }
    /**
     * Gets or sets the bottom margin to use for the labels.
    */
    get labelBottomMargin() {
        return this.i.s;
    }
    set labelBottomMargin(v) {
        this.i.s = +v;
    }
    /**
     * Gets or sets the height to use for the header.
    */
    get headerHeight() {
        return this.i.n;
    }
    set headerHeight(v) {
        this.i.n = +v;
    }
    /**
     * Gets or sets the horizontal alignment to use for the node labels.
    */
    get labelHorizontalAlignment() {
        return this.i.ax;
    }
    set labelHorizontalAlignment(v) {
        this.i.ax = ensureEnum(HorizontalAlignment_$type, v);
    }
    /**
     * Gets or sets the vertical alignment to use for the node labels.
    */
    get labelVerticalAlignment() {
        return this.i.bd;
    }
    set labelVerticalAlignment(v) {
        this.i.bd = ensureEnum(VerticalAlignment_$type, v);
    }
    /**
     * Gets or sets the fill color to use for the nodes.
    */
    get fill() {
        return brushToString(this.i.a5);
    }
    set fill(v) {
        this.i.a5 = stringToBrush(v);
    }
    /**
     * Gets or sets the outline to use for the nodes.
    */
    get outline() {
        return brushToString(this.i.ba);
    }
    set outline(v) {
        this.i.ba = stringToBrush(v);
    }
    /**
     * Gets or sets the stroke thickness to use for the node outline.
    */
    get strokeThickness() {
        return this.i.w;
    }
    set strokeThickness(v) {
        this.i.w = +v;
    }
    get hasUserValues() {
        return this._hasUserValues;
    }
    __m(propertyName) {
        if (!this._inStyling) {
            this._hasUserValues.add(propertyName);
        }
    }
    _styling(container, component, parent) {
        if (this._inStyling) {
            return;
        }
        this._inStyling = true;
        this._stylingContainer = container;
        this._stylingParent = component;
        let genericPrefix = "";
        let typeName = this.i.$type.name;
        if (typeName.indexOf("Xam") === 0) {
            typeName = typeName.substring(3);
        }
        genericPrefix = toSpinal("TreemapNodeStyleComponent");
        let additionalPrefixes = [];
        let prefix = toSpinal(typeName);
        additionalPrefixes.push(prefix + "-");
        let 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);
            }
            let basePrefix = toSpinal(typeName);
            additionalPrefixes.push(basePrefix + "-");
            b = b.baseType;
        }
        if (parent) {
            let parentTypeName = parent.i.$type.name;
            if (parentTypeName.indexOf("Xam") === 0) {
                parentTypeName = parentTypeName.substring(3);
            }
            let 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);
export { IgxTreemapNodeStyleComponent };
//# sourceMappingURL=igx-treemap-node-style-component.js.map