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";
export let IgxTreemapComponent = /*@__PURE__*/ (() => {
    class IgxTreemapComponent {
        constructor(renderer, _elRef, ngZone, injector, componentFactoryResolver) {
            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, (c) => c.i, (i) => {
                if (this._root && this._root.parentElement) {
                    i._styling(this._root, this, this);
                }
            }, (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(() => {
                    this._treeMap.notifySizeChanged();
                });
            }
        }
        set height(value) {
            this._height = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "height", value);
            this._treeMap.notifySizeChanged();
        }
        get height() {
            return this._height;
        }
        set width(value) {
            this._width = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "width", value);
            this._treeMap.notifySizeChanged();
        }
        get width() {
            return this._width;
        }
        /**
         * A collection or manually added axes for the chart.
        */
        get styleMappings() {
            if (this._styleMappings === null) {
                let coll = new IgxTreemapNodeStyleMappingCollection();
                let inner = coll._innerColl;
                inner.addListener((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;
        }
        // supports angular themes or custom properties set in CSS
        updateStyle() {
            this._styling(this._root, this);
        }
        ngOnDestroy() {
            this._treeMap.destroy();
            this._wrapper.destroy();
        }
        ngAfterContentInit() {
            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();
        }
        createImplementation() {
            return new Treemap();
        }
        get i() {
            return this._implementation;
        }
        /**
     * Gets or sets path to use to get the values from the items.
    */
        get valueMemberPath() {
            return this.i.gi;
        }
        set valueMemberPath(v) {
            this.i.gi = v;
        }
        /**
         * Gets or sets the root title to use for breadcrumbs.
        */
        get rootTitle() {
            return this.i.f8;
        }
        set rootTitle(v) {
            this.i.f8 = v;
        }
        /**
         * Gets or sets the root title to use for breadcrumbs.
        */
        get breadcrumbSequence() {
            return this.i.ed;
        }
        set breadcrumbSequence(v) {
            this.i.ed = v;
        }
        /**
         * Gets or sets the path to use to get the Parent of the items.
        */
        get parentIdMemberPath() {
            return this.i.fw;
        }
        set parentIdMemberPath(v) {
            this.i.fw = v;
        }
        /**
         * Gets or sets the path to use to get the Label of the items.
        */
        get labelMemberPath() {
            return this.i.ff;
        }
        set labelMemberPath(v) {
            this.i.ff = v;
        }
        /**
         * Gets or sets the path to use to get the custom value of the items.
        */
        get customValueMemberPath() {
            return this.i.eg;
        }
        set customValueMemberPath(v) {
            this.i.eg = v;
        }
        /**
         * Gets or sets the path to use to get the id of the items.
        */
        get idMemberPath() {
            return this.i.e5;
        }
        set idMemberPath(v) {
            this.i.e5 = v;
        }
        /**
         * Gets or sets the (possibly hierarchical) data to assign to the TreeMap.
        */
        get dataSource() {
            return this.i.dataSource;
        }
        set dataSource(v) {
            this.i.dataSource = v;
        }
        /**
         * Gets or sets brushes to use for the fill scale.
        */
        get fillBrushes() {
            return fromBrushCollection(this.i.b);
        }
        set fillBrushes(v) {
            this.i.b = toBrushCollection(v);
        }
        /**
         * Gets or sets mode to use for the fill scale.
        */
        get fillScaleMode() {
            return this.i.d;
        }
        set fillScaleMode(v) {
            this.i.d = ensureEnum(TreemapFillScaleMode_$type, v);
        }
        /**
         * Gets or sets whether the fill scale is logarithmic.
        */
        get isFillScaleLogarithmic() {
            return this.i.bg;
        }
        set isFillScaleLogarithmic(v) {
            this.i.bg = ensureBool(v);
        }
        /**
         * Gets or sets the logarithm base to use if the fill scale is logarithmic.
        */
        get fillScaleLogarithmBase() {
            return this.i.dy;
        }
        set fillScaleLogarithmBase(v) {
            this.i.dy = +v;
        }
        /**
         * Gets or sets the minimum value to use for the fill scale.
        */
        get fillScaleMinimumValue() {
            return this.i.ct;
        }
        set fillScaleMinimumValue(v) {
            this.i.ct = +v;
        }
        /**
         * Gets or sets the maximum value to use for the fill scale.
        */
        get fillScaleMaximumValue() {
            return this.i.cs;
        }
        set fillScaleMaximumValue(v) {
            this.i.cs = +v;
        }
        /**
         * Gets or sets the vertical fit mode to use for the node labels.
        */
        get labelVerticalFitMode() {
            return this.i.p;
        }
        set labelVerticalFitMode(v) {
            this.i.p = ensureEnum(TreemapLabelVerticalFitMode_$type, v);
        }
        /**
         * Gets or sets the horizontal fit mode to use for the node labels.
        */
        get labelHorizontalFitMode() {
            return this.i.m;
        }
        set labelHorizontalFitMode(v) {
            this.i.m = ensureEnum(TreemapLabelHorizontalFitMode_$type, v);
        }
        /**
         * Gets or sets the background to use for the overlay header when it is hovered.
        */
        get overlayHeaderHoverBackground() {
            return brushToString(this.i.h9);
        }
        set overlayHeaderHoverBackground(v) {
            this.i.h9 = stringToBrush(v);
        }
        /**
         * Gets or sets the background to use for the header when it is hovered.
        */
        get headerHoverBackground() {
            return brushToString(this.i.h3);
        }
        set headerHoverBackground(v) {
            this.i.h3 = stringToBrush(v);
        }
        /**
         * Gets or sets the background to use for the header.
        */
        get headerBackground() {
            return brushToString(this.i.h1);
        }
        set headerBackground(v) {
            this.i.h1 = stringToBrush(v);
        }
        /**
         * Gets or sets the background to use for the overlay header.
        */
        get overlayHeaderBackground() {
            return brushToString(this.i.h8);
        }
        set overlayHeaderBackground(v) {
            this.i.h8 = stringToBrush(v);
        }
        /**
         * Gets or sets the text color to use for the header.
        */
        get headerTextColor() {
            return brushToString(this.i.h6);
        }
        set headerTextColor(v) {
            this.i.h6 = stringToBrush(v);
        }
        /**
         * Gets or sets the dark text color to use for the header.
        */
        get headerDarkTextColor() {
            return brushToString(this.i.h2);
        }
        set headerDarkTextColor(v) {
            this.i.h2 = stringToBrush(v);
        }
        /**
         * Gets or sets the text color to use for the nodes.
        */
        get textColor() {
            return brushToString(this.i.ik);
        }
        set textColor(v) {
            this.i.ik = stringToBrush(v);
        }
        /**
         * Gets or sets the dark text color to use for the nodes.
        */
        get darkTextColor() {
            return brushToString(this.i.h0);
        }
        set darkTextColor(v) {
            this.i.h0 = stringToBrush(v);
        }
        /**
         * Gets or sets the text color to use for the header.
        */
        get headerHoverTextColor() {
            return brushToString(this.i.h5);
        }
        set headerHoverTextColor(v) {
            this.i.h5 = stringToBrush(v);
        }
        /**
         * Gets or sets the dark text color to use for the header when hovered.
        */
        get headerHoverDarkTextColor() {
            return brushToString(this.i.h4);
        }
        set headerHoverDarkTextColor(v) {
            this.i.h4 = stringToBrush(v);
        }
        /**
         * Gets or sets the font to use for content nodes
        */
        get textStyle() {
            if (this.i.aw == null) {
                return null;
            }
            return this.i.aw.fontString;
        }
        set textStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.aw = fi;
        }
        /**
         * Gets or sets the font to use for header nodes
        */
        get headerTextStyle() {
            if (this.i.au == null) {
                return null;
            }
            return this.i.au.fontString;
        }
        set headerTextStyle(v) {
            let fi = new FontInfo();
            fi.fontString = v;
            this.i.au = fi;
        }
        /**
         * Gets or sets the font to use for header nodes
        */
        get headerDisplayMode() {
            return this.i.j;
        }
        set headerDisplayMode(v) {
            this.i.j = ensureEnum(TreemapHeaderDisplayMode_$type, v);
        }
        /**
         * Gets or sets the left margin to use for the header.
        */
        get headerLabelLeftMargin() {
            return this.i.cx;
        }
        set headerLabelLeftMargin(v) {
            this.i.cx = +v;
        }
        /**
         * Gets or sets the top margin to use for the header.
        */
        get headerLabelTopMargin() {
            return this.i.cz;
        }
        set headerLabelTopMargin(v) {
            this.i.cz = +v;
        }
        /**
         * Gets or sets the right margin to use for the header.
        */
        get headerLabelRightMargin() {
            return this.i.cy;
        }
        set headerLabelRightMargin(v) {
            this.i.cy = +v;
        }
        /**
         * Gets or sets the bottom margin to use for the header.
        */
        get headerLabelBottomMargin() {
            return this.i.cw;
        }
        set headerLabelBottomMargin(v) {
            this.i.cw = +v;
        }
        /**
         * Gets or sets the left margin to use for the overlay header.
        */
        get overlayHeaderLabelLeftMargin() {
            return this.i.c7;
        }
        set overlayHeaderLabelLeftMargin(v) {
            this.i.c7 = +v;
        }
        /**
         * Gets or sets the top margin to use for the overlay header.
        */
        get overlayHeaderLabelTopMargin() {
            return this.i.c9;
        }
        set overlayHeaderLabelTopMargin(v) {
            this.i.c9 = +v;
        }
        /**
         * Gets or sets the right margin to use for the overlay header.
        */
        get overlayHeaderLabelRightMargin() {
            return this.i.c8;
        }
        set overlayHeaderLabelRightMargin(v) {
            this.i.c8 = +v;
        }
        /**
         * Gets or sets the bottom margin to use for the overlay header.
        */
        get overlayHeaderLabelBottomMargin() {
            return this.i.c6;
        }
        set overlayHeaderLabelBottomMargin(v) {
            this.i.c6 = +v;
        }
        /**
         * Gets or sets the left margin to use for the labels.
        */
        get labelLeftMargin() {
            return this.i.c2;
        }
        set labelLeftMargin(v) {
            this.i.c2 = +v;
        }
        /**
         * Gets or sets the top margin to use for the labels.
        */
        get labelTopMargin() {
            return this.i.c4;
        }
        set labelTopMargin(v) {
            this.i.c4 = +v;
        }
        /**
         * Gets or sets the right margin to use for the labels.
        */
        get labelRightMargin() {
            return this.i.c3;
        }
        set labelRightMargin(v) {
            this.i.c3 = +v;
        }
        /**
         * Gets or sets the bottom margin to use for the labels.
        */
        get labelBottomMargin() {
            return this.i.c1;
        }
        set labelBottomMargin(v) {
            this.i.c1 = +v;
        }
        /**
         * Gets or sets the left margin to use for the parent nodes.
        */
        get parentNodeLeftMargin() {
            return this.i.dc;
        }
        set parentNodeLeftMargin(v) {
            this.i.dc = +v;
        }
        /**
         * Gets or sets the top margin to use for the parent nodes.
        */
        get parentNodeTopMargin() {
            return this.i.dg;
        }
        set parentNodeTopMargin(v) {
            this.i.dg = +v;
        }
        /**
         * Gets or sets the right margin to use for the parent nodes.
        */
        get parentNodeRightMargin() {
            return this.i.de;
        }
        set parentNodeRightMargin(v) {
            this.i.de = +v;
        }
        /**
         * Gets or sets the bottom margin to use for the parent nodes.
        */
        get parentNodeBottomMargin() {
            return this.i.da;
        }
        set parentNodeBottomMargin(v) {
            this.i.da = +v;
        }
        /**
         * Gets or sets the left padding to use for the parent nodes.
        */
        get parentNodeLeftPadding() {
            return this.i.dd;
        }
        set parentNodeLeftPadding(v) {
            this.i.dd = +v;
        }
        /**
         * Gets or sets the top padding to use for the parent nodes.
        */
        get parentNodeTopPadding() {
            return this.i.dh;
        }
        set parentNodeTopPadding(v) {
            this.i.dh = +v;
        }
        /**
         * Gets or sets the right padding to use for the parent nodes.
        */
        get parentNodeRightPadding() {
            return this.i.df;
        }
        set parentNodeRightPadding(v) {
            this.i.df = +v;
        }
        /**
         * Gets or sets the bottom padding to use for the parent nodes.
        */
        get parentNodeBottomPadding() {
            return this.i.db;
        }
        set parentNodeBottomPadding(v) {
            this.i.db = +v;
        }
        /**
         * Gets or sets the horizontal alignment to use for the node labels.
        */
        get labelHorizontalAlignment() {
            return this.i.hn;
        }
        set labelHorizontalAlignment(v) {
            this.i.hn = ensureEnum(HorizontalAlignment_$type, v);
        }
        /**
         * Gets or sets the vertical alignment to use for the node labels.
        */
        get labelVerticalAlignment() {
            return this.i.ir;
        }
        set labelVerticalAlignment(v) {
            this.i.ir = ensureEnum(VerticalAlignment_$type, v);
        }
        /**
         * Gets or sets the height to use for the header.
        */
        get headerHeight() {
            return this.i.cv;
        }
        set headerHeight(v) {
            this.i.cv = +v;
        }
        /**
         * Gets or sets the outline to use for the nodes.
        */
        get outline() {
            return brushToString(this.i.h7);
        }
        set outline(v) {
            this.i.h7 = stringToBrush(v);
        }
        /**
         * Gets or sets the stroke thickness to use for the node outline.
        */
        get strokeThickness() {
            return this.i.dt;
        }
        set strokeThickness(v) {
            this.i.dt = +v;
        }
        /**
         * Gets or sets the orientation to use for the stripped and slice and dice layout types.
        */
        get layoutOrientation() {
            return this.i.ai;
        }
        set layoutOrientation(v) {
            this.i.ai = ensureEnum(TreemapOrientation_$type, v);
        }
        /**
         * Gets or sets the type of layout to use for the nodes.
        */
        get layoutType() {
            return this.i.s;
        }
        set layoutType(v) {
            this.i.s = ensureEnum(TreemapLayoutType_$type, v);
        }
        /**
         * Gets or sets the minimum size (width or height) to display a node.
        */
        get minimumDisplaySize() {
            return this.i.c5;
        }
        set minimumDisplaySize(v) {
            this.i.c5 = +v;
        }
        /**
         * Gets or sets the number of milliseconds over which changes to the gauge should be animated.
        */
        get transitionDuration() {
            return this.i.d1;
        }
        set transitionDuration(v) {
            this.i.d1 = +v;
        }
        /**
         * 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 pixelScalingRatio() {
            return this.i.di;
        }
        set pixelScalingRatio(v) {
            this.i.di = +v;
        }
        get actualPixelScalingRatio() {
            return this.i.cp;
        }
        set actualPixelScalingRatio(v) {
            this.i.cp = +v;
        }
        /**
         * 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 interactionPixelScalingRatio() {
            return this.i.c0;
        }
        set interactionPixelScalingRatio(v) {
            this.i.c0 = +v;
        }
        /**
         * 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 actualInteractionPixelScalingRatio() {
            return this.i.co;
        }
        set actualInteractionPixelScalingRatio(v) {
            this.i.co = +v;
        }
        get animating() {
            return this.i.bc;
        }
        /**
         * Gets or sets the item to drill to in the treemap.
        */
        get focusItem() {
            return this.i.d3;
        }
        set focusItem(v) {
            this.i.d3 = v;
        }
        findByName(name) {
            if (this.styleMappings != null && this.styleMappings.findByName && this.styleMappings.findByName(name)) {
                return this.styleMappings.findByName(name);
            }
            return null;
        }
        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("TreemapComponent");
            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;
        }
        notifySizeChanged() {
            this.i.notifySizeChanged();
        }
        /**
         * Returns visuals as a serialized string.
        
        */
        exportSerializedVisualData() {
            let iv = this.i.ej();
            return (iv);
        }
        markDirty() {
            this.i.gt();
        }
        onDetachedFromUI() {
            this.i.onDetachedFromUI();
        }
        onAttachedToUI() {
            this.i.onAttachedToUI();
        }
        flush() {
            this.i.gr();
        }
        notifySetItem(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.
        */
        notifyClearItems(source_) {
            this.i.gu(source_);
        }
        notifyInsertItem(source_, index, newItem) {
            this.i.gv(source_, index, newItem);
        }
        notifyRemoveItem(source_, index, oldItem) {
            this.i.gw(source_, index, oldItem);
        }
        simulateHover(point) {
            this.i.hg(toPoint(point));
        }
        /**
         * Fired when a node is being styled. Provides an opportunity to customize node styling.
        */
        get nodeStyling() {
            if (this._nodeStyling == null) {
                this._nodeStyling = new EventEmitter();
                this.i.nodeStyling = delegateCombine(this.i.nodeStyling, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxTreemapNodeStylingEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeNodeStyling) {
                            this.beforeNodeStyling(this, outerArgs);
                        }
                        this._nodeStyling.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodeStyling;
        }
        /**
         * Fired with the pointer is moving over a node.
        */
        get nodePointerOver() {
            if (this._nodePointerOver == null) {
                this._nodePointerOver = new EventEmitter();
                this.i.nodePointerOver = delegateCombine(this.i.nodePointerOver, (o, e) => {
                    let outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeNodePointerOver) {
                        this.beforeNodePointerOver(this, outerArgs);
                    }
                    this._nodePointerOver.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerOver;
        }
        /**
         * Fired when the pointer enters a node.
        */
        get nodePointerEnter() {
            if (this._nodePointerEnter == null) {
                this._nodePointerEnter = new EventEmitter();
                this.i.nodePointerEnter = delegateCombine(this.i.nodePointerEnter, (o, e) => {
                    let outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeNodePointerEnter) {
                        this.beforeNodePointerEnter(this, outerArgs);
                    }
                    this._nodePointerEnter.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerEnter;
        }
        /**
         * Fired when the pointer leaved a node.
        */
        get nodePointerLeave() {
            if (this._nodePointerLeave == null) {
                this._nodePointerLeave = new EventEmitter();
                this.i.nodePointerLeave = delegateCombine(this.i.nodePointerLeave, (o, e) => {
                    let outerArgs = new IgxTreemapNodePointerEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeNodePointerLeave) {
                        this.beforeNodePointerLeave(this, outerArgs);
                    }
                    this._nodePointerLeave.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._nodePointerLeave;
        }
        /**
         * Fired when the pointer is pressed on a node.
        */
        get nodePointerPressed() {
            if (this._nodePointerPressed == null) {
                this._nodePointerPressed = new EventEmitter();
                this.i.nodePointerPressed = delegateCombine(this.i.nodePointerPressed, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxTreemapNodePointerEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeNodePointerPressed) {
                            this.beforeNodePointerPressed(this, outerArgs);
                        }
                        this._nodePointerPressed.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodePointerPressed;
        }
        /**
         * Fired when the pointer is released on a node.
        */
        get nodePointerReleased() {
            if (this._nodePointerReleased == null) {
                this._nodePointerReleased = new EventEmitter();
                this.i.nodePointerReleased = delegateCombine(this.i.nodePointerReleased, (o, e) => {
                    this._runInZone(() => {
                        let outerArgs = new IgxTreemapNodePointerEventArgs();
                        outerArgs._provideImplementation(e);
                        if (this.beforeNodePointerReleased) {
                            this.beforeNodePointerReleased(this, outerArgs);
                        }
                        this._nodePointerReleased.emit({
                            sender: this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._nodePointerReleased;
        }
        _runInZone(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;
})();
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: [`
		:host {
			display: block;
		}
	`]
                }]
        }], 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
            }] } });
