import { Output, EventEmitter, Component, ViewContainerRef, ViewChild, Input, ChangeDetectionStrategy } from '@angular/core';
import { XamDataLegend } from "./XamDataLegend";
import { arrayFindByName, ensureEnum, brushToString, stringToBrush, ensureBool, toSpinal, initializePropertiesFromCss, NamePatcher } from "igniteui-angular-core";
import { FontInfo } from "igniteui-angular-core";
import { AngularRenderer } from "igniteui-angular-core";
import { delegateCombine } from "igniteui-angular-core";
import { Thickness } from "igniteui-angular-core";
import { DataAbbreviationMode_$type } from "igniteui-angular-core";
import { DataLegendHeaderTimeMode_$type } from "igniteui-angular-core";
import { DataLegendHeaderDateMode_$type } from "igniteui-angular-core";
import { DataLegendUnitsMode_$type } from "igniteui-angular-core";
import { DataLegendLabelMode_$type } from "igniteui-angular-core";
import { DataLegendValueMode_$type } from "igniteui-angular-core";
import { DataLegendSummaryType_$type } from "igniteui-angular-core";
import { IgxDataLegendSummaryEventArgs } from './igx-data-legend-summary-event-args';
import { IgxDataLegendStylingRowEventArgs } from './igx-data-legend-styling-row-event-args';
import { IgxDataLegendStylingColumnEventArgs } from './igx-data-legend-styling-column-event-args';
import { LegendItemBadgeShape_$type } from "igniteui-angular-core";
import * as i0 from "@angular/core";
var DataLegendStylingDefaults = {};
/**
 * Represents data legend that displays information about each series including values and summaries.
*/
var IgxDataLegendComponent = /** @class */ /*@__PURE__*/ (function () {
    function IgxDataLegendComponent(renderer, _elRef, ngZone, injector, componentFactoryResolver) {
        var _this = this;
        this.renderer = renderer;
        this._elRef = _elRef;
        this.ngZone = ngZone;
        this.injector = injector;
        this.componentFactoryResolver = componentFactoryResolver;
        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._calculateColumnSummary = null;
        this._styleHeaderRow = null;
        this._styleSeriesRow = null;
        this._styleSummaryRow = null;
        this._styleSeriesColumn = null;
        this._styleSummaryColumn = 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 dataLegend = this.i;
        this._dataLegend = dataLegend;
        this._dataLegend.externalObject = this;
        if (renderer) {
            var ren = new AngularRenderer(root, this.renderer, window.document, this.ngZone, true, DataLegendStylingDefaults);
            this._wrapper = ren;
            dataLegend.provideContainer(ren);
            dataLegend.notifySizeChanged();
            ren.addSizeWatcher(function () {
                _this._dataLegend.notifySizeChanged();
            });
        }
    }
    Object.defineProperty(IgxDataLegendComponent.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "height", value);
            this._dataLegend.notifySizeChanged();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            this.renderer.setStyle(this._elRef.element.nativeElement, "width", value);
            this._dataLegend.notifySizeChanged();
        },
        enumerable: false,
        configurable: true
    });
    // supports angular themes or custom properties set in CSS
    IgxDataLegendComponent.prototype.updateStyle = function () {
        this._styling(this._root, this);
    };
    IgxDataLegendComponent.prototype.ngOnDestroy = function () {
        this._dataLegend.destroy();
        this._wrapper.destroy();
    };
    IgxDataLegendComponent.prototype.ngAfterContentInit = function () {
        this.updateStyle();
    };
    IgxDataLegendComponent.prototype.createImplementation = function () {
        return new XamDataLegend();
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent._staticStyling = function (container, component, parent) {
        var genericPrefix = "";
        var typeName = (component.i ? component.i : component).$type.name;
        if (typeName.indexOf("Xam") === 0) {
            typeName = typeName.substring(3);
        }
        genericPrefix = toSpinal("DataLegend");
        var additionalPrefixes = [];
        var prefix = toSpinal(typeName);
        additionalPrefixes.push(prefix + "-");
        var b = (component.i ? component.i : component).$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, component, genericPrefix + "-", new Set(), false, additionalPrefixes);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "target", {
        /**
         * Gets or sets the target for the data legend.
        */
        get: function () {
            var ret = this.i.target;
            if (!ret) {
                return ret;
            }
            if (ret.externalObject != null) {
                ret = ret.externalObject;
            }
            return ret;
        },
        set: function (v) {
            if (v && v._implementation) {
                v = v._implementation;
            }
            this.i.target = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "actualBadgesVisible", {
        /**
     * Gets whether or not at least one badge is visible based on BadgesShape and setting of a row's IsVisble in StyleSeriesRow event
    */
        get: function () {
            return this.i.bw;
        },
        set: function (v) {
            this.i.bw = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "actualPixelScalingRatio", {
        /**
         * Gets the actual pixel scaling ratio 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.co;
        },
        set: function (v) {
            this.i.co = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "includedSeries", {
        /**
         * Gets or sets indexes or names of series to include in displaying in the data legend, e.g. "0, 1"
        */
        get: function () {
            return this.i.includedSeries;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.includedSeries = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "excludedSeries", {
        /**
         * Gets or sets indexes or names of series to exclude from displaying in the data legend, e.g. "0, 1"
         * The ExcludedSeries property takes precedences over values of IncludedSeries property
        */
        get: function () {
            return this.i.excludedSeries;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.excludedSeries = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "includedColumns", {
        /**
         * Gets or sets names of data columns or their labels to include in displaying in the data legend, e.g. "High, Low" or "H, L"
         * The ExcludedColumns property takes precedences over values of IncludedColumns property
        */
        get: function () {
            return this.i.includedColumns;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.includedColumns = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "excludedColumns", {
        /**
         * Gets or sets names of data columns or their labels to exclude from displaying in the data legend, e.g. "High, Low" or "H, L"
         * The ExcludedColumns property takes precedences over values of IncludedColumns property
        */
        get: function () {
            return this.i.excludedColumns;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.excludedColumns = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "shouldUpdateWhenSeriesDataChanges", {
        /**
         * Gets or sets whether the data legend should update when the series data is mutated.
        */
        get: function () {
            return this.i.b3;
        },
        set: function (v) {
            this.i.b3 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatAbbreviation", {
        /**
         * Gets or sets mode for abbreviating large numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.an;
        },
        set: function (v) {
            this.i.an = ensureEnum(DataAbbreviationMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatMaxFractions", {
        /**
         * Gets or sets maximum digits for formating numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.cu;
        },
        set: function (v) {
            this.i.cu = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatMinFractions", {
        /**
         * Gets or sets minimum digits for formating numbers displayed in the legend
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.cv;
        },
        set: function (v) {
            this.i.cv = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatMode", {
        /**
         * Gets or sets the mode for displaying values in the data legend, e.g. Currency ($500.25), Decimal (500.25), Integer (500)
        */
        get: function () {
            return this.i.a3;
        },
        set: function (v) {
            this.i.a3 = ensureEnum(DataLegendValueMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatCulture", {
        /**
         * Gets or sets globalization culture when displaying values as currencies, e.g. use "en-GB" to display British pound symbol when the ValueFormatMode property is set to 'Currency' mode
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.ey;
        },
        set: function (v) {
            this.i.ey = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatCurrencyCode", {
        /**
         * Gets or sets the currency code used for displaying currency symbol next to values, e.g. USD for $, EUR for €
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.e0;
        },
        set: function (v) {
            this.i.e0 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatUseGrouping", {
        /**
         * Gets or sets whether or not use grouping separator, e.g, 15,000 for 15000
         * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
        */
        get: function () {
            return this.i.b4;
        },
        set: function (v) {
            this.i.b4 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatString", {
        /**
         * Gets or sets the format string for values displayed in the data legend.
        */
        get: function () {
            return this.i.e6;
        },
        set: function (v) {
            this.i.e6 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the ValueFormatString string.
        */
        get: function () {
            return this.i.ah;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ah = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueRowMarginBottom", {
        get: function () {
            return this.i.is ? this.i.is.bottom : NaN;
        },
        set: function (v) {
            this.ensureValueRowMargin();
            this.i.is.bottom = +v;
            this.i.is = this.i.is;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueRowMarginLeft", {
        get: function () {
            return this.i.is ? this.i.is.left : NaN;
        },
        set: function (v) {
            this.ensureValueRowMargin();
            this.i.is.left = +v;
            this.i.is = this.i.is;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueRowMarginRight", {
        get: function () {
            return this.i.is ? this.i.is.right : NaN;
        },
        set: function (v) {
            this.ensureValueRowMargin();
            this.i.is.right = +v;
            this.i.is = this.i.is;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueRowMarginTop", {
        get: function () {
            return this.i.is ? this.i.is.top : NaN;
        },
        set: function (v) {
            this.ensureValueRowMargin();
            this.i.is.top = +v;
            this.i.is = this.i.is;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureValueRowMargin = function () {
        if (this.i.is) {
            return;
        }
        this.i.is = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueRowVisible", {
        /**
         * Gets or sets whether to show series rows.
        */
        get: function () {
            return this.i.b5;
        },
        set: function (v) {
            this.i.b5 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextWhenMissingData", {
        /**
         * Gets or sets text displayed when data column is missing a value, e.g. "no data"
        */
        get: function () {
            return this.i.ff;
        },
        set: function (v) {
            this.i.ff = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextUseSeriesColors", {
        /**
         * Gets or sets whether to use series colors when displaying values in the legend
        */
        get: function () {
            return this.i.b6;
        },
        set: function (v) {
            this.i.b6 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextMarginBottom", {
        get: function () {
            return this.i.it ? this.i.it.bottom : NaN;
        },
        set: function (v) {
            this.ensureValueTextMargin();
            this.i.it.bottom = +v;
            this.i.it = this.i.it;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextMarginLeft", {
        get: function () {
            return this.i.it ? this.i.it.left : NaN;
        },
        set: function (v) {
            this.ensureValueTextMargin();
            this.i.it.left = +v;
            this.i.it = this.i.it;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextMarginRight", {
        get: function () {
            return this.i.it ? this.i.it.right : NaN;
        },
        set: function (v) {
            this.ensureValueTextMargin();
            this.i.it.right = +v;
            this.i.it = this.i.it;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextMarginTop", {
        get: function () {
            return this.i.it ? this.i.it.top : NaN;
        },
        set: function (v) {
            this.ensureValueTextMargin();
            this.i.it.top = +v;
            this.i.it = this.i.it;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureValueTextMargin = function () {
        if (this.i.it) {
            return;
        }
        this.i.it = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.ia);
        },
        set: function (v) {
            this.i.ia = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "valueTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bt == null) {
                return null;
            }
            return this.i.bt.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bt = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerFormatString", {
        /**
         * Gets or sets the format string for header text displayed in the data legend.
        */
        get: function () {
            return this.i.dd;
        },
        set: function (v) {
            this.i.dd = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the HeaderFormatString string.
        */
        get: function () {
            return this.i.ag;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ag = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerFormatCulture", {
        /**
         * Gets or sets globalization culture applied to header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get: function () {
            return this.i.c9;
        },
        set: function (v) {
            this.i.c9 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerFormatDate", {
        /**
         * Gets or sets date format for the header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get: function () {
            return this.i.ap;
        },
        set: function (v) {
            this.i.ap = ensureEnum(DataLegendHeaderDateMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerFormatTime", {
        /**
         * Gets or sets time format for the header only when it displays dates that are fetched from date/time axes
         * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
        */
        get: function () {
            return this.i.aq;
        },
        set: function (v) {
            this.i.aq = ensureEnum(DataLegendHeaderTimeMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerText", {
        /**
         * Gets or sets the HeaderText for the data legend.
        */
        get: function () {
            return this.i.di;
        },
        set: function (v) {
            this.i.di = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextColor", {
        /**
         * Gets or sets the header text color.
        */
        get: function () {
            return brushToString(this.i.h1);
        },
        set: function (v) {
            this.i.h1 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextMarginBottom", {
        get: function () {
            return this.i.ik ? this.i.ik.bottom : NaN;
        },
        set: function (v) {
            this.ensureHeaderTextMargin();
            this.i.ik.bottom = +v;
            this.i.ik = this.i.ik;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextMarginLeft", {
        get: function () {
            return this.i.ik ? this.i.ik.left : NaN;
        },
        set: function (v) {
            this.ensureHeaderTextMargin();
            this.i.ik.left = +v;
            this.i.ik = this.i.ik;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextMarginRight", {
        get: function () {
            return this.i.ik ? this.i.ik.right : NaN;
        },
        set: function (v) {
            this.ensureHeaderTextMargin();
            this.i.ik.right = +v;
            this.i.ik = this.i.ik;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextMarginTop", {
        get: function () {
            return this.i.ik ? this.i.ik.top : NaN;
        },
        set: function (v) {
            this.ensureHeaderTextMargin();
            this.i.ik.top = +v;
            this.i.ik = this.i.ik;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureHeaderTextMargin = function () {
        if (this.i.ik) {
            return;
        }
        this.i.ik = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerRowMarginBottom", {
        get: function () {
            return this.i.ij ? this.i.ij.bottom : NaN;
        },
        set: function (v) {
            this.ensureHeaderRowMargin();
            this.i.ij.bottom = +v;
            this.i.ij = this.i.ij;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerRowMarginLeft", {
        get: function () {
            return this.i.ij ? this.i.ij.left : NaN;
        },
        set: function (v) {
            this.ensureHeaderRowMargin();
            this.i.ij.left = +v;
            this.i.ij = this.i.ij;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerRowMarginRight", {
        get: function () {
            return this.i.ij ? this.i.ij.right : NaN;
        },
        set: function (v) {
            this.ensureHeaderRowMargin();
            this.i.ij.right = +v;
            this.i.ij = this.i.ij;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerRowMarginTop", {
        get: function () {
            return this.i.ij ? this.i.ij.top : NaN;
        },
        set: function (v) {
            this.ensureHeaderRowMargin();
            this.i.ij.top = +v;
            this.i.ij = this.i.ij;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureHeaderRowMargin = function () {
        if (this.i.ij) {
            return;
        }
        this.i.ij = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerRowVisible", {
        /**
         * Gets or sets whether to show Header row.
        */
        get: function () {
            return this.i.b0;
        },
        set: function (v) {
            this.i.b0 = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "headerTextStyle", {
        /**
         * Gets or Sets the style to use for the header text.
        */
        get: function () {
            if (this.i.bl == null) {
                return null;
            }
            return this.i.bl.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bl = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextColor", {
        /**
         * Gets or sets the summary text color.
        */
        get: function () {
            return brushToString(this.i.h5);
        },
        set: function (v) {
            this.i.h5 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextStyle", {
        /**
         * Gets or Sets the style to use for the summary text.
        */
        get: function () {
            if (this.i.bo == null) {
                return null;
            }
            return this.i.bo.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bo = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryType", {
        /**
         * Gets or sets the SummaryType for the data legend.
        */
        get: function () {
            return this.i.a1;
        },
        set: function (v) {
            this.i.a1 = ensureEnum(DataLegendSummaryType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleText", {
        /**
         * Gets or sets the SummaryTitleText for the data legend.
        */
        get: function () {
            return this.i.d9;
        },
        set: function (v) {
            this.i.d9 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextMarginBottom", {
        get: function () {
            return this.i.io ? this.i.io.bottom : NaN;
        },
        set: function (v) {
            this.ensureSummaryTitleTextMargin();
            this.i.io.bottom = +v;
            this.i.io = this.i.io;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextMarginLeft", {
        get: function () {
            return this.i.io ? this.i.io.left : NaN;
        },
        set: function (v) {
            this.ensureSummaryTitleTextMargin();
            this.i.io.left = +v;
            this.i.io = this.i.io;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextMarginRight", {
        get: function () {
            return this.i.io ? this.i.io.right : NaN;
        },
        set: function (v) {
            this.ensureSummaryTitleTextMargin();
            this.i.io.right = +v;
            this.i.io = this.i.io;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryTitleTextMarginTop", {
        get: function () {
            return this.i.io ? this.i.io.top : NaN;
        },
        set: function (v) {
            this.ensureSummaryTitleTextMargin();
            this.i.io.top = +v;
            this.i.io = this.i.io;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureSummaryTitleTextMargin = function () {
        if (this.i.io) {
            return;
        }
        this.i.io = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryRowMarginBottom", {
        get: function () {
            return this.i.im ? this.i.im.bottom : NaN;
        },
        set: function (v) {
            this.ensureSummaryRowMargin();
            this.i.im.bottom = +v;
            this.i.im = this.i.im;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryRowMarginLeft", {
        get: function () {
            return this.i.im ? this.i.im.left : NaN;
        },
        set: function (v) {
            this.ensureSummaryRowMargin();
            this.i.im.left = +v;
            this.i.im = this.i.im;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryRowMarginRight", {
        get: function () {
            return this.i.im ? this.i.im.right : NaN;
        },
        set: function (v) {
            this.ensureSummaryRowMargin();
            this.i.im.right = +v;
            this.i.im = this.i.im;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryRowMarginTop", {
        get: function () {
            return this.i.im ? this.i.im.top : NaN;
        },
        set: function (v) {
            this.ensureSummaryRowMargin();
            this.i.im.top = +v;
            this.i.im = this.i.im;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureSummaryRowMargin = function () {
        if (this.i.im) {
            return;
        }
        this.i.im = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryValueTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.h7);
        },
        set: function (v) {
            this.i.h7 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryValueTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bq == null) {
                return null;
            }
            return this.i.bq.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bq = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryLabelText", {
        /**
         * Gets or sets the units text for the data legend.
        */
        get: function () {
            return this.i.d4;
        },
        set: function (v) {
            this.i.d4 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryLabelTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.h4);
        },
        set: function (v) {
            this.i.h4 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryLabelTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bn == null) {
                return null;
            }
            return this.i.bn.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bn = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryUnitsText", {
        /**
         * Gets or sets the units text for the data legend.
        */
        get: function () {
            return this.i.ef;
        },
        set: function (v) {
            this.i.ef = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryUnitsTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.h6);
        },
        set: function (v) {
            this.i.h6 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "summaryUnitsTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bp == null) {
                return null;
            }
            return this.i.bp.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bp = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "badgeMarginBottom", {
        get: function () {
            return this.i.ii ? this.i.ii.bottom : NaN;
        },
        set: function (v) {
            this.ensureBadgeMargin();
            this.i.ii.bottom = +v;
            this.i.ii = this.i.ii;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "badgeMarginLeft", {
        get: function () {
            return this.i.ii ? this.i.ii.left : NaN;
        },
        set: function (v) {
            this.ensureBadgeMargin();
            this.i.ii.left = +v;
            this.i.ii = this.i.ii;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "badgeMarginRight", {
        get: function () {
            return this.i.ii ? this.i.ii.right : NaN;
        },
        set: function (v) {
            this.ensureBadgeMargin();
            this.i.ii.right = +v;
            this.i.ii = this.i.ii;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "badgeMarginTop", {
        get: function () {
            return this.i.ii ? this.i.ii.top : NaN;
        },
        set: function (v) {
            this.ensureBadgeMargin();
            this.i.ii.top = +v;
            this.i.ii = this.i.ii;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureBadgeMargin = function () {
        if (this.i.ii) {
            return;
        }
        this.i.ii = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "badgeShape", {
        /**
         * Gets or sets the BadgeShape for the data legend.
        */
        get: function () {
            return this.i.a8;
        },
        set: function (v) {
            this.i.a8 = ensureEnum(LegendItemBadgeShape_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "targetCursorPositionX", {
        /**
         * Gets or sets horizontal position (between 0.0 and 1.0) in viewport of the target component
        */
        get: function () {
            return this.i.targetCursorPositionX;
        },
        set: function (v) {
            this.i.targetCursorPositionX = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "targetCursorPositionY", {
        /**
         * Gets or sets vertical position (between 0.0 and 1.0) in viewport of the target component
        */
        get: function () {
            return this.i.targetCursorPositionY;
        },
        set: function (v) {
            this.i.targetCursorPositionY = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsDisplayMode", {
        /**
         * Gets or sets the UnitsMode for the data legend.
        */
        get: function () {
            return this.i.a2;
        },
        set: function (v) {
            this.i.a2 = ensureEnum(DataLegendUnitsMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsText", {
        /**
         * Gets or sets the units text for the data legend.
        */
        get: function () {
            return this.i.es;
        },
        set: function (v) {
            this.i.es = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.h9);
        },
        set: function (v) {
            this.i.h9 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextMarginBottom", {
        get: function () {
            return this.i.iq ? this.i.iq.bottom : NaN;
        },
        set: function (v) {
            this.ensureUnitsTextMargin();
            this.i.iq.bottom = +v;
            this.i.iq = this.i.iq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextMarginLeft", {
        get: function () {
            return this.i.iq ? this.i.iq.left : NaN;
        },
        set: function (v) {
            this.ensureUnitsTextMargin();
            this.i.iq.left = +v;
            this.i.iq = this.i.iq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextMarginRight", {
        get: function () {
            return this.i.iq ? this.i.iq.right : NaN;
        },
        set: function (v) {
            this.ensureUnitsTextMargin();
            this.i.iq.right = +v;
            this.i.iq = this.i.iq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextMarginTop", {
        get: function () {
            return this.i.iq ? this.i.iq.top : NaN;
        },
        set: function (v) {
            this.ensureUnitsTextMargin();
            this.i.iq.top = +v;
            this.i.iq = this.i.iq;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureUnitsTextMargin = function () {
        if (this.i.iq) {
            return;
        }
        this.i.iq = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "unitsTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bs == null) {
                return null;
            }
            return this.i.bs.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bs = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextMarginBottom", {
        get: function () {
            return this.i.ip ? this.i.ip.bottom : NaN;
        },
        set: function (v) {
            this.ensureTitleTextMargin();
            this.i.ip.bottom = +v;
            this.i.ip = this.i.ip;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextMarginLeft", {
        get: function () {
            return this.i.ip ? this.i.ip.left : NaN;
        },
        set: function (v) {
            this.ensureTitleTextMargin();
            this.i.ip.left = +v;
            this.i.ip = this.i.ip;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextMarginRight", {
        get: function () {
            return this.i.ip ? this.i.ip.right : NaN;
        },
        set: function (v) {
            this.ensureTitleTextMargin();
            this.i.ip.right = +v;
            this.i.ip = this.i.ip;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextMarginTop", {
        get: function () {
            return this.i.ip ? this.i.ip.top : NaN;
        },
        set: function (v) {
            this.ensureTitleTextMargin();
            this.i.ip.top = +v;
            this.i.ip = this.i.ip;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureTitleTextMargin = function () {
        if (this.i.ip) {
            return;
        }
        this.i.ip = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextColor", {
        /**
         * Gets or sets the display text color.
        */
        get: function () {
            return brushToString(this.i.h8);
        },
        set: function (v) {
            this.i.h8 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "titleTextStyle", {
        /**
         * Gets or Sets the style to use for the display text.
        */
        get: function () {
            if (this.i.br == null) {
                return null;
            }
            return this.i.br.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.br = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelDisplayMode", {
        /**
         * Gets or sets the mode for displaying labels before series values in the data legend, e.g. O: H: L: C: for financial series
        */
        get: function () {
            return this.i.ar;
        },
        set: function (v) {
            this.i.ar = ensureEnum(DataLegendLabelMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextColor", {
        /**
         * Gets or sets the units text color.
        */
        get: function () {
            return brushToString(this.i.h2);
        },
        set: function (v) {
            this.i.h2 = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextMarginBottom", {
        get: function () {
            return this.i.il ? this.i.il.bottom : NaN;
        },
        set: function (v) {
            this.ensureLabelTextMargin();
            this.i.il.bottom = +v;
            this.i.il = this.i.il;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextMarginLeft", {
        get: function () {
            return this.i.il ? this.i.il.left : NaN;
        },
        set: function (v) {
            this.ensureLabelTextMargin();
            this.i.il.left = +v;
            this.i.il = this.i.il;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextMarginRight", {
        get: function () {
            return this.i.il ? this.i.il.right : NaN;
        },
        set: function (v) {
            this.ensureLabelTextMargin();
            this.i.il.right = +v;
            this.i.il = this.i.il;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextMarginTop", {
        get: function () {
            return this.i.il ? this.i.il.top : NaN;
        },
        set: function (v) {
            this.ensureLabelTextMargin();
            this.i.il.top = +v;
            this.i.il = this.i.il;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.ensureLabelTextMargin = function () {
        if (this.i.il) {
            return;
        }
        this.i.il = new Thickness(2);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "labelTextStyle", {
        /**
         * Gets or Sets the style to use for the units text.
        */
        get: function () {
            if (this.i.bm == null) {
                return null;
            }
            return this.i.bm.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.bm = fi;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.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.pixelScalingRatio;
        },
        set: function (v) {
            this.i.pixelScalingRatio = +v;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.findByName = function (name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        if (this.valueFormatSpecifiers != null && arrayFindByName(this.valueFormatSpecifiers, name)) {
            return arrayFindByName(this.valueFormatSpecifiers, name);
        }
        if (this.headerFormatSpecifiers != null && arrayFindByName(this.headerFormatSpecifiers, name)) {
            return arrayFindByName(this.headerFormatSpecifiers, name);
        }
        return null;
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "hasUserValues", {
        get: function () {
            return this._hasUserValues;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype.__m = function (propertyName) {
        if (!this._inStyling) {
            this._hasUserValues.add(propertyName);
        }
    };
    IgxDataLegendComponent.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("DataLegendComponent");
        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;
    };
    /**
 * Returns the legend visuals expressed as a serialized string.

*/
    IgxDataLegendComponent.prototype.exportSerializedVisualData = function () {
        var iv = this.i.exportSerializedVisualData();
        return (iv);
    };
    /**
     * Notifies the legend about changes to size
    
    */
    IgxDataLegendComponent.prototype.notifySizeChanged = function () {
        this.i.notifySizeChanged();
    };
    /**
     * Forces any pending refresh to the legend to be finished.
    
    */
    IgxDataLegendComponent.prototype.flush = function () {
        this.i.flush();
    };
    IgxDataLegendComponent.prototype.getAbbreviatedNumber = function (number, mode, minDigits, maxDigits) {
        var iv = this.i.cr(number, (mode == null ? null : mode), minDigits, maxDigits);
        return (iv);
    };
    IgxDataLegendComponent.prototype.getAbbreviatedSymbol = function (number, mode, minDigits, maxDigits) {
        var iv = this.i.c8(number, (mode == null ? null : mode), minDigits, maxDigits);
        return (iv);
    };
    IgxDataLegendComponent.prototype.getAbbreviatedString = function (number, mode, minDigits, maxDigits) {
        var iv = this.i.c7(number, (mode == null ? null : mode), minDigits, maxDigits);
        return (iv);
    };
    Object.defineProperty(IgxDataLegendComponent.prototype, "calculateColumnSummary", {
        /**
         * Event raised when calculating summary value for each column in data legend
        */
        get: function () {
            var _this = this;
            if (this._calculateColumnSummary == null) {
                this._calculateColumnSummary = new EventEmitter();
                this.i.calculateColumnSummary = delegateCombine(this.i.calculateColumnSummary, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendSummaryEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeCalculateColumnSummary) {
                            _this.beforeCalculateColumnSummary(_this, outerArgs);
                        }
                        _this._calculateColumnSummary.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._calculateColumnSummary;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "styleHeaderRow", {
        /**
         * Event raised when styling the header row
        */
        get: function () {
            var _this = this;
            if (this._styleHeaderRow == null) {
                this._styleHeaderRow = new EventEmitter();
                this.i.styleHeaderRow = delegateCombine(this.i.styleHeaderRow, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendStylingRowEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeStyleHeaderRow) {
                            _this.beforeStyleHeaderRow(_this, outerArgs);
                        }
                        _this._styleHeaderRow.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._styleHeaderRow;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "styleSeriesRow", {
        /**
         * Event raised when styling title and badge in series rows
        */
        get: function () {
            var _this = this;
            if (this._styleSeriesRow == null) {
                this._styleSeriesRow = new EventEmitter();
                this.i.styleSeriesRow = delegateCombine(this.i.styleSeriesRow, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendStylingRowEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeStyleSeriesRow) {
                            _this.beforeStyleSeriesRow(_this, outerArgs);
                        }
                        _this._styleSeriesRow.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._styleSeriesRow;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "styleSummaryRow", {
        /**
         * Event raised when styling title in the summary row
        */
        get: function () {
            var _this = this;
            if (this._styleSummaryRow == null) {
                this._styleSummaryRow = new EventEmitter();
                this.i.styleSummaryRow = delegateCombine(this.i.styleSummaryRow, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendStylingRowEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeStyleSummaryRow) {
                            _this.beforeStyleSummaryRow(_this, outerArgs);
                        }
                        _this._styleSummaryRow.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._styleSummaryRow;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "styleSeriesColumn", {
        /**
         * Event raised when styling the label, value, and unit columns in series rows
        */
        get: function () {
            var _this = this;
            if (this._styleSeriesColumn == null) {
                this._styleSeriesColumn = new EventEmitter();
                this.i.styleSeriesColumn = delegateCombine(this.i.styleSeriesColumn, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendStylingColumnEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeStyleSeriesColumn) {
                            _this.beforeStyleSeriesColumn(_this, outerArgs);
                        }
                        _this._styleSeriesColumn.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._styleSeriesColumn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataLegendComponent.prototype, "styleSummaryColumn", {
        /**
         * Event raised when styling the label, value, and unit columns in summary row
        */
        get: function () {
            var _this = this;
            if (this._styleSummaryColumn == null) {
                this._styleSummaryColumn = new EventEmitter();
                this.i.styleSummaryColumn = delegateCombine(this.i.styleSummaryColumn, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxDataLegendStylingColumnEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeStyleSummaryColumn) {
                            _this.beforeStyleSummaryColumn(_this, outerArgs);
                        }
                        _this._styleSummaryColumn.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._styleSummaryColumn;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataLegendComponent.prototype._runInZone = function (act) {
        if (this._zoneRunner != null) {
            this._zoneRunner(act);
        }
        else {
            act();
        }
    };
    IgxDataLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxDataLegendComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
    IgxDataLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxDataLegendComponent, selector: "igx-data-legend", inputs: { height: "height", width: "width", target: "target", actualBadgesVisible: "actualBadgesVisible", actualPixelScalingRatio: "actualPixelScalingRatio", includedSeries: "includedSeries", excludedSeries: "excludedSeries", includedColumns: "includedColumns", excludedColumns: "excludedColumns", shouldUpdateWhenSeriesDataChanges: "shouldUpdateWhenSeriesDataChanges", valueFormatAbbreviation: "valueFormatAbbreviation", valueFormatMaxFractions: "valueFormatMaxFractions", valueFormatMinFractions: "valueFormatMinFractions", valueFormatMode: "valueFormatMode", valueFormatCulture: "valueFormatCulture", valueFormatCurrencyCode: "valueFormatCurrencyCode", valueFormatUseGrouping: "valueFormatUseGrouping", valueFormatString: "valueFormatString", valueFormatSpecifiers: "valueFormatSpecifiers", valueRowMarginBottom: "valueRowMarginBottom", valueRowMarginLeft: "valueRowMarginLeft", valueRowMarginRight: "valueRowMarginRight", valueRowMarginTop: "valueRowMarginTop", valueRowVisible: "valueRowVisible", valueTextWhenMissingData: "valueTextWhenMissingData", valueTextUseSeriesColors: "valueTextUseSeriesColors", valueTextMarginBottom: "valueTextMarginBottom", valueTextMarginLeft: "valueTextMarginLeft", valueTextMarginRight: "valueTextMarginRight", valueTextMarginTop: "valueTextMarginTop", valueTextColor: "valueTextColor", valueTextStyle: "valueTextStyle", headerFormatString: "headerFormatString", headerFormatSpecifiers: "headerFormatSpecifiers", headerFormatCulture: "headerFormatCulture", headerFormatDate: "headerFormatDate", headerFormatTime: "headerFormatTime", headerText: "headerText", headerTextColor: "headerTextColor", headerTextMarginBottom: "headerTextMarginBottom", headerTextMarginLeft: "headerTextMarginLeft", headerTextMarginRight: "headerTextMarginRight", headerTextMarginTop: "headerTextMarginTop", headerRowMarginBottom: "headerRowMarginBottom", headerRowMarginLeft: "headerRowMarginLeft", headerRowMarginRight: "headerRowMarginRight", headerRowMarginTop: "headerRowMarginTop", headerRowVisible: "headerRowVisible", headerTextStyle: "headerTextStyle", summaryTitleTextColor: "summaryTitleTextColor", summaryTitleTextStyle: "summaryTitleTextStyle", summaryType: "summaryType", summaryTitleText: "summaryTitleText", summaryTitleTextMarginBottom: "summaryTitleTextMarginBottom", summaryTitleTextMarginLeft: "summaryTitleTextMarginLeft", summaryTitleTextMarginRight: "summaryTitleTextMarginRight", summaryTitleTextMarginTop: "summaryTitleTextMarginTop", summaryRowMarginBottom: "summaryRowMarginBottom", summaryRowMarginLeft: "summaryRowMarginLeft", summaryRowMarginRight: "summaryRowMarginRight", summaryRowMarginTop: "summaryRowMarginTop", summaryValueTextColor: "summaryValueTextColor", summaryValueTextStyle: "summaryValueTextStyle", summaryLabelText: "summaryLabelText", summaryLabelTextColor: "summaryLabelTextColor", summaryLabelTextStyle: "summaryLabelTextStyle", summaryUnitsText: "summaryUnitsText", summaryUnitsTextColor: "summaryUnitsTextColor", summaryUnitsTextStyle: "summaryUnitsTextStyle", badgeMarginBottom: "badgeMarginBottom", badgeMarginLeft: "badgeMarginLeft", badgeMarginRight: "badgeMarginRight", badgeMarginTop: "badgeMarginTop", badgeShape: "badgeShape", targetCursorPositionX: "targetCursorPositionX", targetCursorPositionY: "targetCursorPositionY", unitsDisplayMode: "unitsDisplayMode", unitsText: "unitsText", unitsTextColor: "unitsTextColor", unitsTextMarginBottom: "unitsTextMarginBottom", unitsTextMarginLeft: "unitsTextMarginLeft", unitsTextMarginRight: "unitsTextMarginRight", unitsTextMarginTop: "unitsTextMarginTop", unitsTextStyle: "unitsTextStyle", titleTextMarginBottom: "titleTextMarginBottom", titleTextMarginLeft: "titleTextMarginLeft", titleTextMarginRight: "titleTextMarginRight", titleTextMarginTop: "titleTextMarginTop", titleTextColor: "titleTextColor", titleTextStyle: "titleTextStyle", labelDisplayMode: "labelDisplayMode", labelTextColor: "labelTextColor", labelTextMarginBottom: "labelTextMarginBottom", labelTextMarginLeft: "labelTextMarginLeft", labelTextMarginRight: "labelTextMarginRight", labelTextMarginTop: "labelTextMarginTop", labelTextStyle: "labelTextStyle", pixelScalingRatio: "pixelScalingRatio" }, outputs: { calculateColumnSummary: "calculateColumnSummary", styleHeaderRow: "styleHeaderRow", styleSeriesRow: "styleSeriesRow", styleSummaryRow: "styleSummaryRow", styleSeriesColumn: "styleSeriesColumn", styleSummaryColumn: "styleSummaryColumn" }, host: { classAttribute: "ig-data-legend igx-data-legend" }, providers: [], 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 IgxDataLegendComponent;
}());
export { IgxDataLegendComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxDataLegendComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'igx-data-legend',
                    template: "",
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [],
                    host: { 'class': 'ig-data-legend igx-data-legend' },
                    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 }]
            }], target: [{
                type: Input
            }], actualBadgesVisible: [{
                type: Input
            }], actualPixelScalingRatio: [{
                type: Input
            }], includedSeries: [{
                type: Input
            }], excludedSeries: [{
                type: Input
            }], includedColumns: [{
                type: Input
            }], excludedColumns: [{
                type: Input
            }], shouldUpdateWhenSeriesDataChanges: [{
                type: Input
            }], valueFormatAbbreviation: [{
                type: Input
            }], valueFormatMaxFractions: [{
                type: Input
            }], valueFormatMinFractions: [{
                type: Input
            }], valueFormatMode: [{
                type: Input
            }], valueFormatCulture: [{
                type: Input
            }], valueFormatCurrencyCode: [{
                type: Input
            }], valueFormatUseGrouping: [{
                type: Input
            }], valueFormatString: [{
                type: Input
            }], valueFormatSpecifiers: [{
                type: Input
            }], valueRowMarginBottom: [{
                type: Input
            }], valueRowMarginLeft: [{
                type: Input
            }], valueRowMarginRight: [{
                type: Input
            }], valueRowMarginTop: [{
                type: Input
            }], valueRowVisible: [{
                type: Input
            }], valueTextWhenMissingData: [{
                type: Input
            }], valueTextUseSeriesColors: [{
                type: Input
            }], valueTextMarginBottom: [{
                type: Input
            }], valueTextMarginLeft: [{
                type: Input
            }], valueTextMarginRight: [{
                type: Input
            }], valueTextMarginTop: [{
                type: Input
            }], valueTextColor: [{
                type: Input
            }], valueTextStyle: [{
                type: Input
            }], headerFormatString: [{
                type: Input
            }], headerFormatSpecifiers: [{
                type: Input
            }], headerFormatCulture: [{
                type: Input
            }], headerFormatDate: [{
                type: Input
            }], headerFormatTime: [{
                type: Input
            }], headerText: [{
                type: Input
            }], headerTextColor: [{
                type: Input
            }], headerTextMarginBottom: [{
                type: Input
            }], headerTextMarginLeft: [{
                type: Input
            }], headerTextMarginRight: [{
                type: Input
            }], headerTextMarginTop: [{
                type: Input
            }], headerRowMarginBottom: [{
                type: Input
            }], headerRowMarginLeft: [{
                type: Input
            }], headerRowMarginRight: [{
                type: Input
            }], headerRowMarginTop: [{
                type: Input
            }], headerRowVisible: [{
                type: Input
            }], headerTextStyle: [{
                type: Input
            }], summaryTitleTextColor: [{
                type: Input
            }], summaryTitleTextStyle: [{
                type: Input
            }], summaryType: [{
                type: Input
            }], summaryTitleText: [{
                type: Input
            }], summaryTitleTextMarginBottom: [{
                type: Input
            }], summaryTitleTextMarginLeft: [{
                type: Input
            }], summaryTitleTextMarginRight: [{
                type: Input
            }], summaryTitleTextMarginTop: [{
                type: Input
            }], summaryRowMarginBottom: [{
                type: Input
            }], summaryRowMarginLeft: [{
                type: Input
            }], summaryRowMarginRight: [{
                type: Input
            }], summaryRowMarginTop: [{
                type: Input
            }], summaryValueTextColor: [{
                type: Input
            }], summaryValueTextStyle: [{
                type: Input
            }], summaryLabelText: [{
                type: Input
            }], summaryLabelTextColor: [{
                type: Input
            }], summaryLabelTextStyle: [{
                type: Input
            }], summaryUnitsText: [{
                type: Input
            }], summaryUnitsTextColor: [{
                type: Input
            }], summaryUnitsTextStyle: [{
                type: Input
            }], badgeMarginBottom: [{
                type: Input
            }], badgeMarginLeft: [{
                type: Input
            }], badgeMarginRight: [{
                type: Input
            }], badgeMarginTop: [{
                type: Input
            }], badgeShape: [{
                type: Input
            }], targetCursorPositionX: [{
                type: Input
            }], targetCursorPositionY: [{
                type: Input
            }], unitsDisplayMode: [{
                type: Input
            }], unitsText: [{
                type: Input
            }], unitsTextColor: [{
                type: Input
            }], unitsTextMarginBottom: [{
                type: Input
            }], unitsTextMarginLeft: [{
                type: Input
            }], unitsTextMarginRight: [{
                type: Input
            }], unitsTextMarginTop: [{
                type: Input
            }], unitsTextStyle: [{
                type: Input
            }], titleTextMarginBottom: [{
                type: Input
            }], titleTextMarginLeft: [{
                type: Input
            }], titleTextMarginRight: [{
                type: Input
            }], titleTextMarginTop: [{
                type: Input
            }], titleTextColor: [{
                type: Input
            }], titleTextStyle: [{
                type: Input
            }], labelDisplayMode: [{
                type: Input
            }], labelTextColor: [{
                type: Input
            }], labelTextMarginBottom: [{
                type: Input
            }], labelTextMarginLeft: [{
                type: Input
            }], labelTextMarginRight: [{
                type: Input
            }], labelTextMarginTop: [{
                type: Input
            }], labelTextStyle: [{
                type: Input
            }], pixelScalingRatio: [{
                type: Input
            }], calculateColumnSummary: [{
                type: Output
            }], styleHeaderRow: [{
                type: Output
            }], styleSeriesRow: [{
                type: Output
            }], styleSummaryRow: [{
                type: Output
            }], styleSeriesColumn: [{
                type: Output
            }], styleSummaryColumn: [{
                type: Output
            }] } });
