import * as tslib_1 from "tslib";
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { TreemapNodeStyle } from "./TreemapNodeStyle";
import { TypeRegistrar } from "igniteui-angular-core/ES2015/type";
import { NamePatcher, brushToString, stringToBrush, toSpinal, initializePropertiesFromCss } from "igniteui-angular-core/ES2015/componentUtil";
/**
 * 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.ar);
    }
    set headerHoverBackground(v) {
        this.i.ar = stringToBrush(v);
    }
    /**
     * Gets or sets the background to use for the header.
    */
    get headerBackground() {
        return brushToString(this.i.aq);
    }
    set headerBackground(v) {
        this.i.aq = stringToBrush(v);
    }
    /**
     * Gets or sets the text color to use for the header.
    */
    get headerTextColor() {
        return brushToString(this.i.at);
    }
    set headerTextColor(v) {
        this.i.at = stringToBrush(v);
    }
    /**
     * Gets or sets the label to use for the node.
    */
    get label() {
        return this.i.aa;
    }
    set label(v) {
        this.i.aa = v;
    }
    /**
     * Gets or sets the text color to use for the nodes.
    */
    get textColor() {
        return brushToString(this.i.av);
    }
    set textColor(v) {
        this.i.av = stringToBrush(v);
    }
    /**
     * Gets or sets the text color to use for the header.
    */
    get headerHoverTextColor() {
        return brushToString(this.i.as);
    }
    set headerHoverTextColor(v) {
        this.i.as = stringToBrush(v);
    }
    /**
     * Gets or sets the left margin to use for the header.
    */
    get headerLabelLeftMargin() {
        return this.i.l;
    }
    set headerLabelLeftMargin(v) {
        this.i.l = +v;
    }
    /**
     * Gets or sets the top margin to use for the header.
    */
    get headerLabelTopMargin() {
        return this.i.n;
    }
    set headerLabelTopMargin(v) {
        this.i.n = +v;
    }
    /**
     * Gets or sets the right margin to use for the header.
    */
    get headerLabelRightMargin() {
        return this.i.m;
    }
    set headerLabelRightMargin(v) {
        this.i.m = +v;
    }
    /**
     * Gets or sets the bottom margin to use for the header.
    */
    get headerLabelBottomMargin() {
        return this.i.k;
    }
    set headerLabelBottomMargin(v) {
        this.i.k = +v;
    }
    /**
     * Gets or sets the height to use for the header.
    */
    get headerHeight() {
        return this.i.j;
    }
    set headerHeight(v) {
        this.i.j = +v;
    }
    /**
     * Gets or sets the fill color to use for the nodes.
    */
    get fill() {
        return brushToString(this.i.ap);
    }
    set fill(v) {
        this.i.ap = stringToBrush(v);
    }
    /**
     * Gets or sets the outline to use for the nodes.
    */
    get outline() {
        return brushToString(this.i.au);
    }
    set outline(v) {
        this.i.au = stringToBrush(v);
    }
    /**
     * Gets or sets the stroke thickness to use for the node outline.
    */
    get strokeThickness() {
        return this.i.o;
    }
    set strokeThickness(v) {
        this.i.o = +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, "headerHeight", 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