import { Output, EventEmitter, Component, ViewContainerRef, ViewChild, ContentChildren, Input, ChangeDetectionStrategy } from '@angular/core';
import { Treemap } from "./Treemap";
import { toPoint, ensureEnum, brushToString, stringToBrush, ensureBool, toSpinal, initializePropertiesFromCss, NamePatcher, fromBrushCollection, toBrushCollection } from "igniteui-angular-core";
import { FontInfo } from "igniteui-angular-core";
import { AngularRenderer } from "igniteui-angular-core";
import { delegateCombine } from "igniteui-angular-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { IgxTreemapNodeStyleMappingComponent } from './igx-treemap-node-style-mapping-component';
import { IgxTreemapNodeStyleMappingCollection } from './igx-treemap-node-style-mapping-collection';
import { CollectionAdapter } from "igniteui-angular-core";
import { NotifyCollectionChangedAction } from "igniteui-angular-core";
import { TreemapFillScaleMode_$type } from "./TreemapFillScaleMode";
import { IgxTreemapNodeStylingEventArgs } from "./igx-treemap-node-styling-event-args";
import { TreemapOrientation_$type } from './TreemapOrientation';
import { TreemapLayoutType_$type } from './TreemapLayoutType';
import { IgxTreemapNodePointerEventArgs } from './igx-treemap-node-pointer-event-args';
import { TreemapHeaderDisplayMode_$type } from './TreemapHeaderDisplayMode';
import { HorizontalAlignment_$type } from "igniteui-angular-core";
import { VerticalAlignment_$type } from "igniteui-angular-core";
import { TreemapLabelHorizontalFitMode_$type } from './TreemapLabelHorizontalFitMode';
import { TreemapLabelVerticalFitMode_$type } from './TreemapLabelVerticalFitMode';
import * as i0 from "@angular/core";
var IgxTreemapComponent = /** @class */ /*@__PURE__*/ (function () {
    function IgxTreemapComponent(renderer, _elRef, ngZone, injector, componentFactoryResolver) {
        var _this = this;
        this.renderer = renderer;
        this._elRef = _elRef;
        this.ngZone = ngZone;
        this.injector = injector;
        this.componentFactoryResolver = componentFactoryResolver;
        /**
        * The style mappings actually present in the chart. Do not directly modify this array.
        * This array's contents can be modified by causing Angular to reproject the child content.
        * Or adding and removing stye mappings from the manual style mapping collection on the styleMappings property.
        */
        this.actualStyleMappings = [];
        this._styleMappings = null;
        this._styleMappingsAdapter = null;
        this._wrapper = null;
        this._root = null;
        this._implementation = null;
        this.__p = null;
        this._hasUserValues = new Set();
        this._stylingContainer = null;
        this._stylingParent = null;
        this._inStyling = false;
        this._nodeStyling = null;
        this._nodePointerOver = null;
        this._nodePointerEnter = null;
        this._nodePointerLeave = null;
        this._nodePointerPressed = null;
        this._nodePointerReleased = null;
        this._zoneRunner = null;
        if (this._styling) {
            NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this));
        }
        this._implementation = this.createImplementation();
        if (renderer) {
            this.container = renderer.createElement("div");
            renderer.appendChild(_elRef.element.nativeElement, this.container);
            renderer.setStyle(this.container, "display", "block");
            renderer.setStyle(this.container, "width", "100%");
            renderer.setStyle(this.container, "height", "100%");
        }
        var root;
        root = this.container;
        if (this.container != null) {
            root = this.container;
        }
        if (root && root.nativeElement) {
            root = root.nativeElement;
        }
        this._root = root;
        var treemap = this.i;
        this._treeMap = treemap;
        this._styleMappingsAdapter = new CollectionAdapter([], this.i.styleMappings, this.actualStyleMappings, function (c) { return c.i; }, function (i) {
            if (_this._root && _this._root.parentElement) {
                i._styling(_this._root, _this, _this);
            }
        }, function (i) { });
        if (renderer) {
            var ren = new AngularRenderer(root, this.renderer, window.document, this.ngZone, true, DataChartStylingDefaults);
            this._wrapper = ren;
            treemap.provideContainer(ren);
            treemap.notifySizeChanged();
            ren.addSizeWatcher(function () {
                _this._treeMap.notifySizeChanged();
            });
        }
    }
    Object.defineProperty(IgxTreemapComponent.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "height", value);
            this._treeMap.notifySizeChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "width", value);
            this._treeMap.notifySizeChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "styleMappings", {
        /**
         * A collection or manually added axes for the chart.
        */
        get: function () {
            var _this = this;
            if (this._styleMappings === null) {
                var coll = new IgxTreemapNodeStyleMappingCollection();
                var inner = coll._innerColl;
                inner.addListener(function (sender, e) {
                    switch (e.action) {
                        case NotifyCollectionChangedAction.Add:
                            _this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Remove:
                            _this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex);
                            break;
                        case NotifyCollectionChangedAction.Replace:
                            _this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex);
                            _this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
                            break;
                        case NotifyCollectionChangedAction.Reset:
                            _this._styleMappingsAdapter.clearManualItems();
                            break;
                    }
                });
                this._styleMappings = coll;
            }
            return this._styleMappings;
        },
        enumerable: false,
        configurable: true
    });
    // supports angular themes or custom properties set in CSS
    IgxTreemapComponent.prototype.updateStyle = function () {
        this._styling(this._root, this);
    };
    IgxTreemapComponent.prototype.ngOnDestroy = function () {
        this._treeMap.destroy();
        this._wrapper.destroy();
    };
    IgxTreemapComponent.prototype.ngAfterContentInit = function () {
        this._styleMappingsAdapter.updateQuery(this.contentStyleMappings);
        this._styling(this._root, this);
        if (this.actualStyleMappings && this.actualStyleMappings.length > 0) {
            var currStyleMapping = this.actualStyleMappings;
            for (var i = 0; i < currStyleMapping.length; i++) {
                currStyleMapping[i]._styling(this._root, this, this);
            }
        }
        this.i.notifySizeChanged();
        this.updateStyle();
    };
    IgxTreemapComponent.prototype.createImplementation = function () {
        return new Treemap();
    };
    Object.defineProperty(IgxTreemapComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "valueMemberPath", {
        /**
     * Gets or sets path to use to get the values from the items.
    */
        get: function () {
            return this.i.gi;
        },
        set: function (v) {
            this.i.gi = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "rootTitle", {
        /**
         * Gets or sets the root title to use for breadcrumbs.
        */
        get: function () {
            return this.i.f8;
        },
        set: function (v) {
            this.i.f8 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "breadcrumbSequence", {
        /**
         * Gets or sets the root title to use for breadcrumbs.
        */
        get: function () {
            return this.i.ed;
        },
        set: function (v) {
            this.i.ed = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentIdMemberPath", {
        /**
         * Gets or sets the path to use to get the Parent of the items.
        */
        get: function () {
            return this.i.fw;
        },
        set: function (v) {
            this.i.fw = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelMemberPath", {
        /**
         * Gets or sets the path to use to get the Label of the items.
        */
        get: function () {
            return this.i.ff;
        },
        set: function (v) {
            this.i.ff = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "customValueMemberPath", {
        /**
         * Gets or sets the path to use to get the custom value of the items.
        */
        get: function () {
            return this.i.eg;
        },
        set: function (v) {
            this.i.eg = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "idMemberPath", {
        /**
         * Gets or sets the path to use to get the id of the items.
        */
        get: function () {
            return this.i.e5;
        },
        set: function (v) {
            this.i.e5 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "dataSource", {
        /**
         * Gets or sets the (possibly hierarchical) data to assign to the TreeMap.
        */
        get: function () {
            return this.i.dataSource;
        },
        set: function (v) {
            this.i.dataSource = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "fillBrushes", {
        /**
         * Gets or sets brushes to use for the fill scale.
        */
        get: function () {
            return fromBrushCollection(this.i.b);
        },
        set: function (v) {
            this.i.b = toBrushCollection(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMode", {
        /**
         * Gets or sets mode to use for the fill scale.
        */
        get: function () {
            return this.i.d;
        },
        set: function (v) {
            this.i.d = ensureEnum(TreemapFillScaleMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "isFillScaleLogarithmic", {
        /**
         * Gets or sets whether the fill scale is logarithmic.
        */
        get: function () {
            return this.i.bg;
        },
        set: function (v) {
            this.i.bg = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleLogarithmBase", {
        /**
         * Gets or sets the logarithm base to use if the fill scale is logarithmic.
        */
        get: function () {
            return this.i.dy;
        },
        set: function (v) {
            this.i.dy = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMinimumValue", {
        /**
         * Gets or sets the minimum value to use for the fill scale.
        */
        get: function () {
            return this.i.ct;
        },
        set: function (v) {
            this.i.ct = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "fillScaleMaximumValue", {
        /**
         * Gets or sets the maximum value to use for the fill scale.
        */
        get: function () {
            return this.i.cs;
        },
        set: function (v) {
            this.i.cs = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelVerticalFitMode", {
        /**
         * Gets or sets the vertical fit mode to use for the node labels.
        */
        get: function () {
            return this.i.p;
        },
        set: function (v) {
            this.i.p = ensureEnum(TreemapLabelVerticalFitMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelHorizontalFitMode", {
        /**
         * Gets or sets the horizontal fit mode to use for the node labels.
        */
        get: function () {
            return this.i.m;
        },
        set: function (v) {
            this.i.m = ensureEnum(TreemapLabelHorizontalFitMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderHoverBackground", {
        /**
         * Gets or sets the background to use for the overlay header when it is hovered.
        */
        get: function () {
            return brushToString(this.i.h9);
        },
        set: function (v) {
            this.i.h9 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverBackground", {
        /**
         * Gets or sets the background to use for the header when it is hovered.
        */
        get: function () {
            return brushToString(this.i.h3);
        },
        set: function (v) {
            this.i.h3 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerBackground", {
        /**
         * Gets or sets the background to use for the header.
        */
        get: function () {
            return brushToString(this.i.h1);
        },
        set: function (v) {
            this.i.h1 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderBackground", {
        /**
         * Gets or sets the background to use for the overlay header.
        */
        get: function () {
            return brushToString(this.i.h8);
        },
        set: function (v) {
            this.i.h8 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerTextColor", {
        /**
         * Gets or sets the text color to use for the header.
        */
        get: function () {
            return brushToString(this.i.h6);
        },
        set: function (v) {
            this.i.h6 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerDarkTextColor", {
        /**
         * Gets or sets the dark text color to use for the header.
        */
        get: function () {
            return brushToString(this.i.h2);
        },
        set: function (v) {
            this.i.h2 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "textColor", {
        /**
         * Gets or sets the text color to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.ik);
        },
        set: function (v) {
            this.i.ik = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "darkTextColor", {
        /**
         * Gets or sets the dark text color to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.h0);
        },
        set: function (v) {
            this.i.h0 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverTextColor", {
        /**
         * Gets or sets the text color to use for the header.
        */
        get: function () {
            return brushToString(this.i.h5);
        },
        set: function (v) {
            this.i.h5 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerHoverDarkTextColor", {
        /**
         * Gets or sets the dark text color to use for the header when hovered.
        */
        get: function () {
            return brushToString(this.i.h4);
        },
        set: function (v) {
            this.i.h4 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "textStyle", {
        /**
         * Gets or sets the font to use for content nodes
        */
        get: function () {
            if (this.i.aw == null) {
                return null;
            }
            return this.i.aw.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.aw = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerTextStyle", {
        /**
         * Gets or sets the font to use for header nodes
        */
        get: function () {
            if (this.i.au == null) {
                return null;
            }
            return this.i.au.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.au = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerDisplayMode", {
        /**
         * Gets or sets the font to use for header nodes
        */
        get: function () {
            return this.i.j;
        },
        set: function (v) {
            this.i.j = ensureEnum(TreemapHeaderDisplayMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelLeftMargin", {
        /**
         * Gets or sets the left margin to use for the header.
        */
        get: function () {
            return this.i.cx;
        },
        set: function (v) {
            this.i.cx = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelTopMargin", {
        /**
         * Gets or sets the top margin to use for the header.
        */
        get: function () {
            return this.i.cz;
        },
        set: function (v) {
            this.i.cz = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelRightMargin", {
        /**
         * Gets or sets the right margin to use for the header.
        */
        get: function () {
            return this.i.cy;
        },
        set: function (v) {
            this.i.cy = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerLabelBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the header.
        */
        get: function () {
            return this.i.cw;
        },
        set: function (v) {
            this.i.cw = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelLeftMargin", {
        /**
         * Gets or sets the left margin to use for the overlay header.
        */
        get: function () {
            return this.i.c7;
        },
        set: function (v) {
            this.i.c7 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelTopMargin", {
        /**
         * Gets or sets the top margin to use for the overlay header.
        */
        get: function () {
            return this.i.c9;
        },
        set: function (v) {
            this.i.c9 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelRightMargin", {
        /**
         * Gets or sets the right margin to use for the overlay header.
        */
        get: function () {
            return this.i.c8;
        },
        set: function (v) {
            this.i.c8 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "overlayHeaderLabelBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the overlay header.
        */
        get: function () {
            return this.i.c6;
        },
        set: function (v) {
            this.i.c6 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelLeftMargin", {
        /**
         * Gets or sets the left margin to use for the labels.
        */
        get: function () {
            return this.i.c2;
        },
        set: function (v) {
            this.i.c2 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelTopMargin", {
        /**
         * Gets or sets the top margin to use for the labels.
        */
        get: function () {
            return this.i.c4;
        },
        set: function (v) {
            this.i.c4 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelRightMargin", {
        /**
         * Gets or sets the right margin to use for the labels.
        */
        get: function () {
            return this.i.c3;
        },
        set: function (v) {
            this.i.c3 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the labels.
        */
        get: function () {
            return this.i.c1;
        },
        set: function (v) {
            this.i.c1 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeLeftMargin", {
        /**
         * Gets or sets the left margin to use for the parent nodes.
        */
        get: function () {
            return this.i.dc;
        },
        set: function (v) {
            this.i.dc = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeTopMargin", {
        /**
         * Gets or sets the top margin to use for the parent nodes.
        */
        get: function () {
            return this.i.dg;
        },
        set: function (v) {
            this.i.dg = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeRightMargin", {
        /**
         * Gets or sets the right margin to use for the parent nodes.
        */
        get: function () {
            return this.i.de;
        },
        set: function (v) {
            this.i.de = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeBottomMargin", {
        /**
         * Gets or sets the bottom margin to use for the parent nodes.
        */
        get: function () {
            return this.i.da;
        },
        set: function (v) {
            this.i.da = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeLeftPadding", {
        /**
         * Gets or sets the left padding to use for the parent nodes.
        */
        get: function () {
            return this.i.dd;
        },
        set: function (v) {
            this.i.dd = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeTopPadding", {
        /**
         * Gets or sets the top padding to use for the parent nodes.
        */
        get: function () {
            return this.i.dh;
        },
        set: function (v) {
            this.i.dh = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeRightPadding", {
        /**
         * Gets or sets the right padding to use for the parent nodes.
        */
        get: function () {
            return this.i.df;
        },
        set: function (v) {
            this.i.df = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "parentNodeBottomPadding", {
        /**
         * Gets or sets the bottom padding to use for the parent nodes.
        */
        get: function () {
            return this.i.db;
        },
        set: function (v) {
            this.i.db = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment to use for the node labels.
        */
        get: function () {
            return this.i.hn;
        },
        set: function (v) {
            this.i.hn = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "labelVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment to use for the node labels.
        */
        get: function () {
            return this.i.ir;
        },
        set: function (v) {
            this.i.ir = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "headerHeight", {
        /**
         * Gets or sets the height to use for the header.
        */
        get: function () {
            return this.i.cv;
        },
        set: function (v) {
            this.i.cv = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "outline", {
        /**
         * Gets or sets the outline to use for the nodes.
        */
        get: function () {
            return brushToString(this.i.h7);
        },
        set: function (v) {
            this.i.h7 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "strokeThickness", {
        /**
         * Gets or sets the stroke thickness to use for the node outline.
        */
        get: function () {
            return this.i.dt;
        },
        set: function (v) {
            this.i.dt = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "layoutOrientation", {
        /**
         * Gets or sets the orientation to use for the stripped and slice and dice layout types.
        */
        get: function () {
            return this.i.ai;
        },
        set: function (v) {
            this.i.ai = ensureEnum(TreemapOrientation_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "layoutType", {
        /**
         * Gets or sets the type of layout to use for the nodes.
        */
        get: function () {
            return this.i.s;
        },
        set: function (v) {
            this.i.s = ensureEnum(TreemapLayoutType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "minimumDisplaySize", {
        /**
         * Gets or sets the minimum size (width or height) to display a node.
        */
        get: function () {
            return this.i.c5;
        },
        set: function (v) {
            this.i.c5 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "transitionDuration", {
        /**
         * Gets or sets the number of milliseconds over which changes to the gauge should be animated.
        */
        get: function () {
            return this.i.d1;
        },
        set: function (v) {
            this.i.d1 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "pixelScalingRatio", {
        /**
         * Gets or sets the scaling value used to affect the pixel density of the control.
         * A higher scaling ratio will produce crisper visuals at the expense of memory.  Lower values will cause the control
         * to appear blurry.
        */
        get: function () {
            return this.i.di;
        },
        set: function (v) {
            this.i.di = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "actualPixelScalingRatio", {
        get: function () {
            return this.i.cp;
        },
        set: function (v) {
            this.i.cp = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "interactionPixelScalingRatio", {
        /**
         * Gets or sets the scaling value used to affect the pixel density of the control while it is animating.
         * A higher scaling ratio will produce crisper visuals at the expense of memory.  Lower values will cause the control
         * to appear blurry.
        */
        get: function () {
            return this.i.c0;
        },
        set: function (v) {
            this.i.c0 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "actualInteractionPixelScalingRatio", {
        /**
         * Gets or sets the resolved scaling value used to affect the pixel density of the control while it is animating.
         * A higher scaling ratio will produce crisper visuals at the expense of memory.  Lower values will cause the control
         * to appear blurry.
        */
        get: function () {
            return this.i.co;
        },
        set: function (v) {
            this.i.co = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "animating", {
        get: function () {
            return this.i.bc;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "focusItem", {
        /**
         * Gets or sets the item to drill to in the treemap.
        */
        get: function () {
            return this.i.d3;
        },
        set: function (v) {
            this.i.d3 = v;
        },
        enumerable: false,
        configurable: true
    });
    IgxTreemapComponent.prototype.findByName = function (name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        if (this.styleMappings != null && this.styleMappings.findByName && this.styleMappings.findByName(name)) {
            return this.styleMappings.findByName(name);
        }
        return null;
    };
    Object.defineProperty(IgxTreemapComponent.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: false,
        configurable: true
    });
    IgxTreemapComponent.prototype.__m = function (propertyName) {
        if (!this._inStyling) {
            this._hasUserValues.add(propertyName);
        }
    };
    IgxTreemapComponent.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("TreemapComponent");
        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;
    };
    IgxTreemapComponent.prototype.notifySizeChanged = function () {
        this.i.notifySizeChanged();
    };
    /**
     * Returns visuals as a serialized string.
    
    */
    IgxTreemapComponent.prototype.exportSerializedVisualData = function () {
        var iv = this.i.ej();
        return (iv);
    };
    IgxTreemapComponent.prototype.markDirty = function () {
        this.i.gt();
    };
    IgxTreemapComponent.prototype.onDetachedFromUI = function () {
        this.i.onDetachedFromUI();
    };
    IgxTreemapComponent.prototype.onAttachedToUI = function () {
        this.i.onAttachedToUI();
    };
    IgxTreemapComponent.prototype.flush = function () {
        this.i.gr();
    };
    IgxTreemapComponent.prototype.notifySetItem = function (source_, index, oldItem, newItem) {
        this.i.gx(source_, index, oldItem, newItem);
    };
    /**
     * Manually notifies the treemap's data source that the data it has bound to has been cleared and needs to be re-examined.
     * This should not be called if the data that the pie chart is bound to is already observable.
    
    * @param source_  * The data source.
    */
    IgxTreemapComponent.prototype.notifyClearItems = function (source_) {
        this.i.gu(source_);
    };
    IgxTreemapComponent.prototype.notifyInsertItem = function (source_, index, newItem) {
        this.i.gv(source_, index, newItem);
    };
    IgxTreemapComponent.prototype.notifyRemoveItem = function (source_, index, oldItem) {
        this.i.gw(source_, index, oldItem);
    };
    IgxTreemapComponent.prototype.simulateHover = function (point) {
        this.i.hg(toPoint(point));
    };
    Object.defineProperty(IgxTreemapComponent.prototype, "nodeStyling", {
        /**
         * Fired when a node is being styled. Provides an opportunity to customize node styling.
        */
        get: function () {
            var _this = this;
            if (this._nodeStyling == null) {
                this._nodeStyling = new EventEmitter();
                this.i.nodeStyling = delegateCombine(this.i.nodeStyling, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxTreemapNodeStylingEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeNodeStyling) {
                            _this.beforeNodeStyling(_this, outerArgs);
                        }
                        _this._nodeStyling.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodeStyling;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerOver", {
        /**
         * Fired with the pointer is moving over a node.
        */
        get: function () {
            var _this = this;
            if (this._nodePointerOver == null) {
                this._nodePointerOver = new EventEmitter();
                this.i.nodePointerOver = delegateCombine(this.i.nodePointerOver, function (o, e) {
                    var outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeNodePointerOver) {
                        _this.beforeNodePointerOver(_this, outerArgs);
                    }
                    _this._nodePointerOver.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerOver;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerEnter", {
        /**
         * Fired when the pointer enters a node.
        */
        get: function () {
            var _this = this;
            if (this._nodePointerEnter == null) {
                this._nodePointerEnter = new EventEmitter();
                this.i.nodePointerEnter = delegateCombine(this.i.nodePointerEnter, function (o, e) {
                    var outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeNodePointerEnter) {
                        _this.beforeNodePointerEnter(_this, outerArgs);
                    }
                    _this._nodePointerEnter.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerEnter;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerLeave", {
        /**
         * Fired when the pointer leaved a node.
        */
        get: function () {
            var _this = this;
            if (this._nodePointerLeave == null) {
                this._nodePointerLeave = new EventEmitter();
                this.i.nodePointerLeave = delegateCombine(this.i.nodePointerLeave, function (o, e) {
                    var outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeNodePointerLeave) {
                        _this.beforeNodePointerLeave(_this, outerArgs);
                    }
                    _this._nodePointerLeave.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerLeave;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerPressed", {
        /**
         * Fired when the pointer is pressed on a node.
        */
        get: function () {
            var _this = this;
            if (this._nodePointerPressed == null) {
                this._nodePointerPressed = new EventEmitter();
                this.i.nodePointerPressed = delegateCombine(this.i.nodePointerPressed, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxTreemapNodePointerEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeNodePointerPressed) {
                            _this.beforeNodePointerPressed(_this, outerArgs);
                        }
                        _this._nodePointerPressed.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodePointerPressed;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxTreemapComponent.prototype, "nodePointerReleased", {
        /**
         * Fired when the pointer is released on a node.
        */
        get: function () {
            var _this = this;
            if (this._nodePointerReleased == null) {
                this._nodePointerReleased = new EventEmitter();
                this.i.nodePointerReleased = delegateCombine(this.i.nodePointerReleased, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxTreemapNodePointerEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeNodePointerReleased) {
                            _this.beforeNodePointerReleased(_this, outerArgs);
                        }
                        _this._nodePointerReleased.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodePointerReleased;
        },
        enumerable: false,
        configurable: true
    });
    IgxTreemapComponent.prototype._runInZone = function (act) {
        if (this._zoneRunner != null) {
            this._zoneRunner(act);
        }
        else {
            act();
        }
    };
    IgxTreemapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxTreemapComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
    IgxTreemapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: IgxTreemapComponent, selector: "igx-treemap", inputs: { height: "height", width: "width", valueMemberPath: "valueMemberPath", rootTitle: "rootTitle", breadcrumbSequence: "breadcrumbSequence", parentIdMemberPath: "parentIdMemberPath", labelMemberPath: "labelMemberPath", customValueMemberPath: "customValueMemberPath", idMemberPath: "idMemberPath", dataSource: "dataSource", fillBrushes: "fillBrushes", fillScaleMode: "fillScaleMode", isFillScaleLogarithmic: "isFillScaleLogarithmic", fillScaleLogarithmBase: "fillScaleLogarithmBase", fillScaleMinimumValue: "fillScaleMinimumValue", fillScaleMaximumValue: "fillScaleMaximumValue", labelVerticalFitMode: "labelVerticalFitMode", labelHorizontalFitMode: "labelHorizontalFitMode", overlayHeaderHoverBackground: "overlayHeaderHoverBackground", headerHoverBackground: "headerHoverBackground", headerBackground: "headerBackground", overlayHeaderBackground: "overlayHeaderBackground", headerTextColor: "headerTextColor", headerDarkTextColor: "headerDarkTextColor", textColor: "textColor", darkTextColor: "darkTextColor", headerHoverTextColor: "headerHoverTextColor", headerHoverDarkTextColor: "headerHoverDarkTextColor", textStyle: "textStyle", headerTextStyle: "headerTextStyle", headerDisplayMode: "headerDisplayMode", headerLabelLeftMargin: "headerLabelLeftMargin", headerLabelTopMargin: "headerLabelTopMargin", headerLabelRightMargin: "headerLabelRightMargin", headerLabelBottomMargin: "headerLabelBottomMargin", overlayHeaderLabelLeftMargin: "overlayHeaderLabelLeftMargin", overlayHeaderLabelTopMargin: "overlayHeaderLabelTopMargin", overlayHeaderLabelRightMargin: "overlayHeaderLabelRightMargin", overlayHeaderLabelBottomMargin: "overlayHeaderLabelBottomMargin", labelLeftMargin: "labelLeftMargin", labelTopMargin: "labelTopMargin", labelRightMargin: "labelRightMargin", labelBottomMargin: "labelBottomMargin", parentNodeLeftMargin: "parentNodeLeftMargin", parentNodeTopMargin: "parentNodeTopMargin", parentNodeRightMargin: "parentNodeRightMargin", parentNodeBottomMargin: "parentNodeBottomMargin", parentNodeLeftPadding: "parentNodeLeftPadding", parentNodeTopPadding: "parentNodeTopPadding", parentNodeRightPadding: "parentNodeRightPadding", parentNodeBottomPadding: "parentNodeBottomPadding", labelHorizontalAlignment: "labelHorizontalAlignment", labelVerticalAlignment: "labelVerticalAlignment", headerHeight: "headerHeight", outline: "outline", strokeThickness: "strokeThickness", layoutOrientation: "layoutOrientation", layoutType: "layoutType", minimumDisplaySize: "minimumDisplaySize", transitionDuration: "transitionDuration", pixelScalingRatio: "pixelScalingRatio", actualPixelScalingRatio: "actualPixelScalingRatio", interactionPixelScalingRatio: "interactionPixelScalingRatio", actualInteractionPixelScalingRatio: "actualInteractionPixelScalingRatio", focusItem: "focusItem" }, outputs: { nodeStyling: "nodeStyling", nodePointerOver: "nodePointerOver", nodePointerEnter: "nodePointerEnter", nodePointerLeave: "nodePointerLeave", nodePointerPressed: "nodePointerPressed", nodePointerReleased: "nodePointerReleased" }, host: { classAttribute: "ig-treemap igx-treemap" }, providers: [], queries: [{ propertyName: "contentStyleMappings", predicate: IgxTreemapNodeStyleMappingComponent }], viewQueries: [{ propertyName: "_dynamicContent", first: true, predicate: ["dynamicContent"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "", isInline: true, styles: ["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
    return IgxTreemapComponent;
}());
export { IgxTreemapComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: IgxTreemapComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-treemap',
                    template: "",
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [],
                    host: { 'class': 'ig-treemap igx-treemap' },
                    styles: ["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]
                }]
        }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { height: [{
                type: Input
            }], width: [{
                type: Input
            }], _dynamicContent: [{
                type: ViewChild,
                args: ["dynamicContent", { read: ViewContainerRef, static: true }]
            }], contentStyleMappings: [{
                type: ContentChildren,
                args: [IgxTreemapNodeStyleMappingComponent]
            }], valueMemberPath: [{
                type: Input
            }], rootTitle: [{
                type: Input
            }], breadcrumbSequence: [{
                type: Input
            }], parentIdMemberPath: [{
                type: Input
            }], labelMemberPath: [{
                type: Input
            }], customValueMemberPath: [{
                type: Input
            }], idMemberPath: [{
                type: Input
            }], dataSource: [{
                type: Input
            }], fillBrushes: [{
                type: Input
            }], fillScaleMode: [{
                type: Input
            }], isFillScaleLogarithmic: [{
                type: Input
            }], fillScaleLogarithmBase: [{
                type: Input
            }], fillScaleMinimumValue: [{
                type: Input
            }], fillScaleMaximumValue: [{
                type: Input
            }], labelVerticalFitMode: [{
                type: Input
            }], labelHorizontalFitMode: [{
                type: Input
            }], overlayHeaderHoverBackground: [{
                type: Input
            }], headerHoverBackground: [{
                type: Input
            }], headerBackground: [{
                type: Input
            }], overlayHeaderBackground: [{
                type: Input
            }], headerTextColor: [{
                type: Input
            }], headerDarkTextColor: [{
                type: Input
            }], textColor: [{
                type: Input
            }], darkTextColor: [{
                type: Input
            }], headerHoverTextColor: [{
                type: Input
            }], headerHoverDarkTextColor: [{
                type: Input
            }], textStyle: [{
                type: Input
            }], headerTextStyle: [{
                type: Input
            }], headerDisplayMode: [{
                type: Input
            }], headerLabelLeftMargin: [{
                type: Input
            }], headerLabelTopMargin: [{
                type: Input
            }], headerLabelRightMargin: [{
                type: Input
            }], headerLabelBottomMargin: [{
                type: Input
            }], overlayHeaderLabelLeftMargin: [{
                type: Input
            }], overlayHeaderLabelTopMargin: [{
                type: Input
            }], overlayHeaderLabelRightMargin: [{
                type: Input
            }], overlayHeaderLabelBottomMargin: [{
                type: Input
            }], labelLeftMargin: [{
                type: Input
            }], labelTopMargin: [{
                type: Input
            }], labelRightMargin: [{
                type: Input
            }], labelBottomMargin: [{
                type: Input
            }], parentNodeLeftMargin: [{
                type: Input
            }], parentNodeTopMargin: [{
                type: Input
            }], parentNodeRightMargin: [{
                type: Input
            }], parentNodeBottomMargin: [{
                type: Input
            }], parentNodeLeftPadding: [{
                type: Input
            }], parentNodeTopPadding: [{
                type: Input
            }], parentNodeRightPadding: [{
                type: Input
            }], parentNodeBottomPadding: [{
                type: Input
            }], labelHorizontalAlignment: [{
                type: Input
            }], labelVerticalAlignment: [{
                type: Input
            }], headerHeight: [{
                type: Input
            }], outline: [{
                type: Input
            }], strokeThickness: [{
                type: Input
            }], layoutOrientation: [{
                type: Input
            }], layoutType: [{
                type: Input
            }], minimumDisplaySize: [{
                type: Input
            }], transitionDuration: [{
                type: Input
            }], pixelScalingRatio: [{
                type: Input
            }], actualPixelScalingRatio: [{
                type: Input
            }], interactionPixelScalingRatio: [{
                type: Input
            }], actualInteractionPixelScalingRatio: [{
                type: Input
            }], focusItem: [{
                type: Input
            }], nodeStyling: [{
                type: Output
            }], nodePointerOver: [{
                type: Output
            }], nodePointerEnter: [{
                type: Output
            }], nodePointerLeave: [{
                type: Output
            }], nodePointerPressed: [{
                type: Output
            }], nodePointerReleased: [{
                type: Output
            }] } });
