import { IgrAxis } from "./igr-axis";
import { DataToolTipLayerGroupingMode_$type } from "igniteui-react-core";
import { DataTooltipGroupedPositionX_$type } from "igniteui-react-core";
import { DataTooltipGroupedPositionY_$type } from "igniteui-react-core";
import { DataAbbreviationMode_$type } from "igniteui-react-core";
import { DataLegendValueMode_$type } from "igniteui-react-core";
import { DataLegendHeaderDateMode_$type } from "igniteui-react-core";
import { DataLegendHeaderTimeMode_$type } from "igniteui-react-core";
import { DataLegendSummaryType_$type } from "igniteui-react-core";
import { LegendItemBadgeShape_$type } from "igniteui-react-core";
import { DataLegendLayoutMode_$type } from "igniteui-react-core";
import { DataLegendUnitsMode_$type } from "igniteui-react-core";
import { DataLegendLabelMode_$type } from "igniteui-react-core";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { DataToolTipLayer } from "./DataToolTipLayer";
import { ensureBool, ensureEnum, brushToString, stringToBrush, arrayFindByName } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
/**
 * Represents an annotation layer that displays grouped tooltips with summaries for series.
*/
export class IgrDataToolTipLayer extends IgrAnnotationLayer {
    createImplementation() {
        return new DataToolTipLayer();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets whether the series is an annotation layer displayed only when hovering over the chart.
    */
    get isAnnotationHoverLayer() {
        return this.i.er;
    }
    /**
     * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
    */
    get isDefaultTooltipBehaviorDisabled() {
        return this.i.e2;
    }
    /**
     * Gets or sets the Axis to target this annotation to. If null, this annotation layer will not render content.
    */
    get targetAxis() {
        const r = this.i.z4;
        if (r == null) {
            return null;
        }
        if (!r.externalObject) {
            let e = IgrAxis._createFromInternal(r);
            if (e) {
                e._implementation = r;
            }
            r.externalObject = e;
        }
        return r.externalObject;
    }
    set targetAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.z4 = null : this.i.z4 = v.i;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing the tooltips.
    */
    get useInterpolation() {
        return this.i.abm;
    }
    set useInterpolation(v) {
        this.i.abm = ensureBool(v);
    }
    /**
     * Gets or sets the grouping mode to apply to use for the tooltip layer.
    */
    get groupingMode() {
        return this.i.aan;
    }
    set groupingMode(v) {
        this.i.aan = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
    }
    /**
     * Gets the actual resolved tooltip layer grouping mode.
    */
    get actualGroupingMode() {
        return this.i.aam;
    }
    set actualGroupingMode(v) {
        this.i.aam = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
    }
    /**
     * Gets or sets the offset of the tooltip layer on the X axis.
    */
    get positionOffsetX() {
        return this.i.abv;
    }
    set positionOffsetX(v) {
        this.i.abv = +v;
    }
    /**
     * Gets or sets the offset of the tooltip layer on the Y axis.
    */
    get positionOffsetY() {
        return this.i.abw;
    }
    set positionOffsetY(v) {
        this.i.abw = +v;
    }
    /**
     * Gets or sets the default offset of the tooltip layer on the X axis.
    */
    get defaultPositionOffsetX() {
        return this.i.abt;
    }
    set defaultPositionOffsetX(v) {
        this.i.abt = +v;
    }
    /**
     * Gets or sets the default offset of the tooltip layer on the Y axis.
    */
    get defaultPositionOffsetY() {
        return this.i.abu;
    }
    set defaultPositionOffsetY(v) {
        this.i.abu = +v;
    }
    /**
     * Gets or sets the tooltip position mode on the X axis for grouped series.
    */
    get groupedPositionModeX() {
        return this.i.aaf;
    }
    set groupedPositionModeX(v) {
        this.i.aaf = ensureEnum(DataTooltipGroupedPositionX_$type, v);
    }
    /**
     * Gets the actual resolved tooltip position mode on the X axis for grouped series.
    */
    get actualGroupedPositionModeX() {
        return this.i.aae;
    }
    set actualGroupedPositionModeX(v) {
        this.i.aae = ensureEnum(DataTooltipGroupedPositionX_$type, v);
    }
    /**
     * Gets or sets the tooltip position mode on the Y axis for grouped series.
    */
    get groupedPositionModeY() {
        return this.i.aaj;
    }
    set groupedPositionModeY(v) {
        this.i.aaj = ensureEnum(DataTooltipGroupedPositionY_$type, v);
    }
    /**
     * Gets the actual resolved tooltip position mode on the Y axis for grouped series.
    */
    get actualGroupedPositionModeY() {
        return this.i.aai;
    }
    set actualGroupedPositionModeY(v) {
        this.i.aai = ensureEnum(DataTooltipGroupedPositionY_$type, v);
    }
    /**
     * Gets or sets whether the data legend should update when the series data is mutated.
    */
    get shouldUpdateWhenSeriesDataChanges() {
        return this.i.abl;
    }
    set shouldUpdateWhenSeriesDataChanges(v) {
        this.i.abl = ensureBool(v);
    }
    /**
     * Gets or sets indexes, titles, or names of series to include in displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
     * The ExcludedSeries property takes precedence over values of IncludedSeries property
    */
    get includedSeries() {
        return this.i.z1;
    }
    set includedSeries(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.z1 = v;
    }
    /**
     * Gets or sets indexes, titles, or names of series to exclude from displaying in the data legend, e.g. "0, 1" or "Series1 Title, Series2 Title"
     * The ExcludedSeries property takes precedence over values of IncludedSeries property
    */
    get excludedSeries() {
        return this.i.zw;
    }
    set excludedSeries(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zw = v;
    }
    /**
     * Gets or sets names of data columns or their labels to include in displaying in the data tooltip, e.g. "High, Low" or "H, L"
     * The ExcludedColumns property takes precedence over values of IncludedColumns property
    */
    get includedColumns() {
        return this.i.z0;
    }
    set includedColumns(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.z0 = v;
    }
    /**
     * Gets or sets names of data columns or their labels to exclude from displaying in the data tooltip, e.g. "High, Low" or "H, L"
     * The ExcludedColumns property takes precedence over values of IncludedColumns property
    */
    get excludedColumns() {
        return this.i.zv;
    }
    set excludedColumns(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zv = v;
    }
    /**
     * Gets or sets mode for abbreviating large numbers displayed in the legend
     * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
    */
    get valueFormatAbbreviation() {
        return this.i.z5;
    }
    set valueFormatAbbreviation(v) {
        this.i.z5 = ensureEnum(DataAbbreviationMode_$type, v);
    }
    /**
     * Gets or sets maximum digits for formatting numbers displayed in the legend
     * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
    */
    get valueFormatMaxFractions() {
        return this.i.acv;
    }
    set valueFormatMaxFractions(v) {
        this.i.acv = +v;
    }
    /**
     * Gets or sets minimum digits for formatting numbers displayed in the legend
     * This property is ignored when setting ValueFormatSpecifiers or ValueFormatString properties
    */
    get valueFormatMinFractions() {
        return this.i.acw;
    }
    set valueFormatMinFractions(v) {
        this.i.acw = +v;
    }
    /**
     * Gets or sets the mode for displaying values in the data legend, e.g. Currency ($500.25), Decimal (500.25), Integer (500)
    */
    get valueFormatMode() {
        return this.i.aac;
    }
    set valueFormatMode(v) {
        this.i.aac = ensureEnum(DataLegendValueMode_$type, v);
    }
    /**
     * 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 valueFormatCulture() {
        return this.i.aew;
    }
    set valueFormatCulture(v) {
        this.i.aew = v;
    }
    /**
     * 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 valueFormatUseGrouping() {
        return this.i.abn;
    }
    set valueFormatUseGrouping(v) {
        this.i.abn = ensureBool(v);
    }
    /**
     * Gets or sets the format string for values displayed in the data legend.
    */
    get valueFormatString() {
        return this.i.ae2;
    }
    set valueFormatString(v) {
        this.i.ae2 = v;
    }
    /**
     * Gets or sets the format specifiers to use with the ValueFormatString string.
    */
    get valueFormatSpecifiers() {
        return this.i.z2;
    }
    set valueFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.z2 = v;
    }
    get valueRowMarginBottom() {
        return this.i.ah1 ? this.i.ah1.bottom : NaN;
    }
    set valueRowMarginBottom(v) {
        this.ensureValueRowMargin();
        this.i.ah1.bottom = +v;
        this.i.ah1 = this.i.ah1;
    }
    get valueRowMarginLeft() {
        return this.i.ah1 ? this.i.ah1.left : NaN;
    }
    set valueRowMarginLeft(v) {
        this.ensureValueRowMargin();
        this.i.ah1.left = +v;
        this.i.ah1 = this.i.ah1;
    }
    get valueRowMarginRight() {
        return this.i.ah1 ? this.i.ah1.right : NaN;
    }
    set valueRowMarginRight(v) {
        this.ensureValueRowMargin();
        this.i.ah1.right = +v;
        this.i.ah1 = this.i.ah1;
    }
    get valueRowMarginTop() {
        return this.i.ah1 ? this.i.ah1.top : NaN;
    }
    set valueRowMarginTop(v) {
        this.ensureValueRowMargin();
        this.i.ah1.top = +v;
        this.i.ah1 = this.i.ah1;
    }
    ensureValueRowMargin() {
        if (this.i.ah1) {
            return;
        }
        this.i.ah1 = new Thickness(2);
    }
    /**
     * Gets or sets whether to show series rows.
    */
    get valueRowVisible() {
        return this.i.abo;
    }
    set valueRowVisible(v) {
        this.i.abo = ensureBool(v);
    }
    /**
     * Gets or sets text displayed when data column is missing a value, e.g. "no data"
    */
    get valueTextWhenMissingData() {
        return this.i.afb;
    }
    set valueTextWhenMissingData(v) {
        this.i.afb = v;
    }
    /**
     * Gets or sets whether to use series colors when displaying values in the legend
    */
    get valueTextUseSeriesColors() {
        return this.i.abp;
    }
    set valueTextUseSeriesColors(v) {
        this.i.abp = ensureBool(v);
    }
    get valueTextMarginBottom() {
        return this.i.ah2 ? this.i.ah2.bottom : NaN;
    }
    set valueTextMarginBottom(v) {
        this.ensureValueTextMargin();
        this.i.ah2.bottom = +v;
        this.i.ah2 = this.i.ah2;
    }
    get valueTextMarginLeft() {
        return this.i.ah2 ? this.i.ah2.left : NaN;
    }
    set valueTextMarginLeft(v) {
        this.ensureValueTextMargin();
        this.i.ah2.left = +v;
        this.i.ah2 = this.i.ah2;
    }
    get valueTextMarginRight() {
        return this.i.ah2 ? this.i.ah2.right : NaN;
    }
    set valueTextMarginRight(v) {
        this.ensureValueTextMargin();
        this.i.ah2.right = +v;
        this.i.ah2 = this.i.ah2;
    }
    get valueTextMarginTop() {
        return this.i.ah2 ? this.i.ah2.top : NaN;
    }
    set valueTextMarginTop(v) {
        this.ensureValueTextMargin();
        this.i.ah2.top = +v;
        this.i.ah2 = this.i.ah2;
    }
    ensureValueTextMargin() {
        if (this.i.ah2) {
            return;
        }
        this.i.ah2 = new Thickness(2);
    }
    /**
     * Gets or sets the units text color.
    */
    get valueTextColor() {
        return brushToString(this.i.ahk);
    }
    set valueTextColor(v) {
        this.i.ahk = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get valueTextStyle() {
        if (this.i.abb == null) {
            return null;
        }
        return this.i.abb.fontString;
    }
    set valueTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.abb = fi;
    }
    /**
     * Gets or sets the format string for header text displayed in the data legend.
    */
    get headerFormatString() {
        return this.i.adj;
    }
    set headerFormatString(v) {
        this.i.adj = v;
    }
    /**
     * Gets or sets the format specifiers to use with the HeaderFormatString string.
    */
    get headerFormatSpecifiers() {
        return this.i.zz;
    }
    set headerFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zz = v;
    }
    /**
     * Gets or sets globalization culture when displaying header as date time
     * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
    */
    get headerFormatCulture() {
        return this.i.adf;
    }
    set headerFormatCulture(v) {
        this.i.adf = v;
    }
    /**
     * Gets or sets date format for the header
     * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
    */
    get headerFormatDate() {
        return this.i.z6;
    }
    set headerFormatDate(v) {
        this.i.z6 = ensureEnum(DataLegendHeaderDateMode_$type, v);
    }
    /**
     * Gets or sets time format for the header
     * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
    */
    get headerFormatTime() {
        return this.i.z7;
    }
    set headerFormatTime(v) {
        this.i.z7 = ensureEnum(DataLegendHeaderTimeMode_$type, v);
    }
    /**
     * Gets or sets the HeaderText for the data legend.
    */
    get headerText() {
        return this.i.ado;
    }
    set headerText(v) {
        this.i.ado = v;
    }
    /**
     * Gets or sets the header text color.
    */
    get headerTextColor() {
        return brushToString(this.i.ahc);
    }
    set headerTextColor(v) {
        this.i.ahc = stringToBrush(v);
    }
    get headerTextMarginBottom() {
        return this.i.ahv ? this.i.ahv.bottom : NaN;
    }
    set headerTextMarginBottom(v) {
        this.ensureHeaderTextMargin();
        this.i.ahv.bottom = +v;
        this.i.ahv = this.i.ahv;
    }
    get headerTextMarginLeft() {
        return this.i.ahv ? this.i.ahv.left : NaN;
    }
    set headerTextMarginLeft(v) {
        this.ensureHeaderTextMargin();
        this.i.ahv.left = +v;
        this.i.ahv = this.i.ahv;
    }
    get headerTextMarginRight() {
        return this.i.ahv ? this.i.ahv.right : NaN;
    }
    set headerTextMarginRight(v) {
        this.ensureHeaderTextMargin();
        this.i.ahv.right = +v;
        this.i.ahv = this.i.ahv;
    }
    get headerTextMarginTop() {
        return this.i.ahv ? this.i.ahv.top : NaN;
    }
    set headerTextMarginTop(v) {
        this.ensureHeaderTextMargin();
        this.i.ahv.top = +v;
        this.i.ahv = this.i.ahv;
    }
    ensureHeaderTextMargin() {
        if (this.i.ahv) {
            return;
        }
        this.i.ahv = new Thickness(2);
    }
    get headerRowMarginBottom() {
        return this.i.ahu ? this.i.ahu.bottom : NaN;
    }
    set headerRowMarginBottom(v) {
        this.ensureHeaderRowMargin();
        this.i.ahu.bottom = +v;
        this.i.ahu = this.i.ahu;
    }
    get headerRowMarginLeft() {
        return this.i.ahu ? this.i.ahu.left : NaN;
    }
    set headerRowMarginLeft(v) {
        this.ensureHeaderRowMargin();
        this.i.ahu.left = +v;
        this.i.ahu = this.i.ahu;
    }
    get headerRowMarginRight() {
        return this.i.ahu ? this.i.ahu.right : NaN;
    }
    set headerRowMarginRight(v) {
        this.ensureHeaderRowMargin();
        this.i.ahu.right = +v;
        this.i.ahu = this.i.ahu;
    }
    get headerRowMarginTop() {
        return this.i.ahu ? this.i.ahu.top : NaN;
    }
    set headerRowMarginTop(v) {
        this.ensureHeaderRowMargin();
        this.i.ahu.top = +v;
        this.i.ahu = this.i.ahu;
    }
    ensureHeaderRowMargin() {
        if (this.i.ahu) {
            return;
        }
        this.i.ahu = new Thickness(2);
    }
    /**
     * Gets or sets whether to show Header row.
    */
    get headerRowVisible() {
        return this.i.abe;
    }
    set headerRowVisible(v) {
        this.i.abe = ensureBool(v);
    }
    /**
     * Gets or Sets the style to use for the header text.
    */
    get headerTextStyle() {
        if (this.i.aa3 == null) {
            return null;
        }
        return this.i.aa3.fontString;
    }
    set headerTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa3 = fi;
    }
    /**
     * Gets or sets whether to show Header row.
    */
    get groupRowVisible() {
        return this.i.abd;
    }
    set groupRowVisible(v) {
        this.i.abd = ensureBool(v);
    }
    /**
     * Gets or sets the Group text color.
    */
    get groupTextColor() {
        return brushToString(this.i.ahb);
    }
    set groupTextColor(v) {
        this.i.ahb = stringToBrush(v);
    }
    get groupTextMarginBottom() {
        return this.i.aht ? this.i.aht.bottom : NaN;
    }
    set groupTextMarginBottom(v) {
        this.ensureGroupTextMargin();
        this.i.aht.bottom = +v;
        this.i.aht = this.i.aht;
    }
    get groupTextMarginLeft() {
        return this.i.aht ? this.i.aht.left : NaN;
    }
    set groupTextMarginLeft(v) {
        this.ensureGroupTextMargin();
        this.i.aht.left = +v;
        this.i.aht = this.i.aht;
    }
    get groupTextMarginRight() {
        return this.i.aht ? this.i.aht.right : NaN;
    }
    set groupTextMarginRight(v) {
        this.ensureGroupTextMargin();
        this.i.aht.right = +v;
        this.i.aht = this.i.aht;
    }
    get groupTextMarginTop() {
        return this.i.aht ? this.i.aht.top : NaN;
    }
    set groupTextMarginTop(v) {
        this.ensureGroupTextMargin();
        this.i.aht.top = +v;
        this.i.aht = this.i.aht;
    }
    ensureGroupTextMargin() {
        if (this.i.aht) {
            return;
        }
        this.i.aht = new Thickness(2);
    }
    get groupRowMarginBottom() {
        return this.i.ahs ? this.i.ahs.bottom : NaN;
    }
    set groupRowMarginBottom(v) {
        this.ensureGroupRowMargin();
        this.i.ahs.bottom = +v;
        this.i.ahs = this.i.ahs;
    }
    get groupRowMarginLeft() {
        return this.i.ahs ? this.i.ahs.left : NaN;
    }
    set groupRowMarginLeft(v) {
        this.ensureGroupRowMargin();
        this.i.ahs.left = +v;
        this.i.ahs = this.i.ahs;
    }
    get groupRowMarginRight() {
        return this.i.ahs ? this.i.ahs.right : NaN;
    }
    set groupRowMarginRight(v) {
        this.ensureGroupRowMargin();
        this.i.ahs.right = +v;
        this.i.ahs = this.i.ahs;
    }
    get groupRowMarginTop() {
        return this.i.ahs ? this.i.ahs.top : NaN;
    }
    set groupRowMarginTop(v) {
        this.ensureGroupRowMargin();
        this.i.ahs.top = +v;
        this.i.ahs = this.i.ahs;
    }
    ensureGroupRowMargin() {
        if (this.i.ahs) {
            return;
        }
        this.i.ahs = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the Group text.
    */
    get groupTextStyle() {
        if (this.i.aa2 == null) {
            return null;
        }
        return this.i.aa2.fontString;
    }
    set groupTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa2 = fi;
    }
    /**
     * Gets or sets the summary text color.
    */
    get summaryTitleTextColor() {
        return brushToString(this.i.ahf);
    }
    set summaryTitleTextColor(v) {
        this.i.ahf = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the summary text.
    */
    get summaryTitleTextStyle() {
        if (this.i.aa6 == null) {
            return null;
        }
        return this.i.aa6.fontString;
    }
    set summaryTitleTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa6 = fi;
    }
    /**
     * Gets or sets the SummaryType for the data legend.
    */
    get summaryType() {
        return this.i.aaa;
    }
    set summaryType(v) {
        this.i.aaa = ensureEnum(DataLegendSummaryType_$type, v);
    }
    /**
     * Gets or sets the SummaryTitleText for the data legend.
    */
    get summaryTitleText() {
        return this.i.ad8;
    }
    set summaryTitleText(v) {
        this.i.ad8 = v;
    }
    get summaryTitleTextMarginBottom() {
        return this.i.ahy ? this.i.ahy.bottom : NaN;
    }
    set summaryTitleTextMarginBottom(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahy.bottom = +v;
        this.i.ahy = this.i.ahy;
    }
    get summaryTitleTextMarginLeft() {
        return this.i.ahy ? this.i.ahy.left : NaN;
    }
    set summaryTitleTextMarginLeft(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahy.left = +v;
        this.i.ahy = this.i.ahy;
    }
    get summaryTitleTextMarginRight() {
        return this.i.ahy ? this.i.ahy.right : NaN;
    }
    set summaryTitleTextMarginRight(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahy.right = +v;
        this.i.ahy = this.i.ahy;
    }
    get summaryTitleTextMarginTop() {
        return this.i.ahy ? this.i.ahy.top : NaN;
    }
    set summaryTitleTextMarginTop(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahy.top = +v;
        this.i.ahy = this.i.ahy;
    }
    ensureSummaryTitleTextMargin() {
        if (this.i.ahy) {
            return;
        }
        this.i.ahy = new Thickness(2);
    }
    get summaryRowMarginBottom() {
        return this.i.ahx ? this.i.ahx.bottom : NaN;
    }
    set summaryRowMarginBottom(v) {
        this.ensureSummaryRowMargin();
        this.i.ahx.bottom = +v;
        this.i.ahx = this.i.ahx;
    }
    get summaryRowMarginLeft() {
        return this.i.ahx ? this.i.ahx.left : NaN;
    }
    set summaryRowMarginLeft(v) {
        this.ensureSummaryRowMargin();
        this.i.ahx.left = +v;
        this.i.ahx = this.i.ahx;
    }
    get summaryRowMarginRight() {
        return this.i.ahx ? this.i.ahx.right : NaN;
    }
    set summaryRowMarginRight(v) {
        this.ensureSummaryRowMargin();
        this.i.ahx.right = +v;
        this.i.ahx = this.i.ahx;
    }
    get summaryRowMarginTop() {
        return this.i.ahx ? this.i.ahx.top : NaN;
    }
    set summaryRowMarginTop(v) {
        this.ensureSummaryRowMargin();
        this.i.ahx.top = +v;
        this.i.ahx = this.i.ahx;
    }
    ensureSummaryRowMargin() {
        if (this.i.ahx) {
            return;
        }
        this.i.ahx = new Thickness(2);
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryValueTextColor() {
        return brushToString(this.i.ahh);
    }
    set summaryValueTextColor(v) {
        this.i.ahh = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryValueTextStyle() {
        if (this.i.aa8 == null) {
            return null;
        }
        return this.i.aa8.fontString;
    }
    set summaryValueTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa8 = fi;
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get summaryLabelText() {
        return this.i.ad3;
    }
    set summaryLabelText(v) {
        this.i.ad3 = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryLabelTextColor() {
        return brushToString(this.i.ahe);
    }
    set summaryLabelTextColor(v) {
        this.i.ahe = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryLabelTextStyle() {
        if (this.i.aa5 == null) {
            return null;
        }
        return this.i.aa5.fontString;
    }
    set summaryLabelTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa5 = fi;
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get summaryUnitsText() {
        return this.i.aee;
    }
    set summaryUnitsText(v) {
        this.i.aee = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryUnitsTextColor() {
        return brushToString(this.i.ahg);
    }
    set summaryUnitsTextColor(v) {
        this.i.ahg = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryUnitsTextStyle() {
        if (this.i.aa7 == null) {
            return null;
        }
        return this.i.aa7.fontString;
    }
    set summaryUnitsTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa7 = fi;
    }
    get badgeMarginBottom() {
        return this.i.ahr ? this.i.ahr.bottom : NaN;
    }
    set badgeMarginBottom(v) {
        this.ensureBadgeMargin();
        this.i.ahr.bottom = +v;
        this.i.ahr = this.i.ahr;
    }
    get badgeMarginLeft() {
        return this.i.ahr ? this.i.ahr.left : NaN;
    }
    set badgeMarginLeft(v) {
        this.ensureBadgeMargin();
        this.i.ahr.left = +v;
        this.i.ahr = this.i.ahr;
    }
    get badgeMarginRight() {
        return this.i.ahr ? this.i.ahr.right : NaN;
    }
    set badgeMarginRight(v) {
        this.ensureBadgeMargin();
        this.i.ahr.right = +v;
        this.i.ahr = this.i.ahr;
    }
    get badgeMarginTop() {
        return this.i.ahr ? this.i.ahr.top : NaN;
    }
    set badgeMarginTop(v) {
        this.ensureBadgeMargin();
        this.i.ahr.top = +v;
        this.i.ahr = this.i.ahr;
    }
    ensureBadgeMargin() {
        if (this.i.ahr) {
            return;
        }
        this.i.ahr = new Thickness(2);
    }
    /**
     * Gets or sets the BadgeShape for the data legend.
    */
    get badgeShape() {
        return this.i.aar;
    }
    set badgeShape(v) {
        this.i.aar = ensureEnum(LegendItemBadgeShape_$type, v);
    }
    /**
     * Gets or sets the layout of content in the data legend
    */
    get layoutMode() {
        return this.i.z9;
    }
    set layoutMode(v) {
        this.i.z9 = ensureEnum(DataLegendLayoutMode_$type, v);
    }
    /**
     * Gets or sets the UnitsMode for the data legend.
    */
    get unitsDisplayMode() {
        return this.i.aab;
    }
    set unitsDisplayMode(v) {
        this.i.aab = ensureEnum(DataLegendUnitsMode_$type, v);
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get unitsText() {
        return this.i.aep;
    }
    set unitsText(v) {
        this.i.aep = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get unitsTextColor() {
        return brushToString(this.i.ahj);
    }
    set unitsTextColor(v) {
        this.i.ahj = stringToBrush(v);
    }
    get unitsTextMarginBottom() {
        return this.i.ah0 ? this.i.ah0.bottom : NaN;
    }
    set unitsTextMarginBottom(v) {
        this.ensureUnitsTextMargin();
        this.i.ah0.bottom = +v;
        this.i.ah0 = this.i.ah0;
    }
    get unitsTextMarginLeft() {
        return this.i.ah0 ? this.i.ah0.left : NaN;
    }
    set unitsTextMarginLeft(v) {
        this.ensureUnitsTextMargin();
        this.i.ah0.left = +v;
        this.i.ah0 = this.i.ah0;
    }
    get unitsTextMarginRight() {
        return this.i.ah0 ? this.i.ah0.right : NaN;
    }
    set unitsTextMarginRight(v) {
        this.ensureUnitsTextMargin();
        this.i.ah0.right = +v;
        this.i.ah0 = this.i.ah0;
    }
    get unitsTextMarginTop() {
        return this.i.ah0 ? this.i.ah0.top : NaN;
    }
    set unitsTextMarginTop(v) {
        this.ensureUnitsTextMargin();
        this.i.ah0.top = +v;
        this.i.ah0 = this.i.ah0;
    }
    ensureUnitsTextMargin() {
        if (this.i.ah0) {
            return;
        }
        this.i.ah0 = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get unitsTextStyle() {
        if (this.i.aba == null) {
            return null;
        }
        return this.i.aba.fontString;
    }
    set unitsTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aba = fi;
    }
    get titleTextMarginBottom() {
        return this.i.ahz ? this.i.ahz.bottom : NaN;
    }
    set titleTextMarginBottom(v) {
        this.ensureTitleTextMargin();
        this.i.ahz.bottom = +v;
        this.i.ahz = this.i.ahz;
    }
    get titleTextMarginLeft() {
        return this.i.ahz ? this.i.ahz.left : NaN;
    }
    set titleTextMarginLeft(v) {
        this.ensureTitleTextMargin();
        this.i.ahz.left = +v;
        this.i.ahz = this.i.ahz;
    }
    get titleTextMarginRight() {
        return this.i.ahz ? this.i.ahz.right : NaN;
    }
    set titleTextMarginRight(v) {
        this.ensureTitleTextMargin();
        this.i.ahz.right = +v;
        this.i.ahz = this.i.ahz;
    }
    get titleTextMarginTop() {
        return this.i.ahz ? this.i.ahz.top : NaN;
    }
    set titleTextMarginTop(v) {
        this.ensureTitleTextMargin();
        this.i.ahz.top = +v;
        this.i.ahz = this.i.ahz;
    }
    ensureTitleTextMargin() {
        if (this.i.ahz) {
            return;
        }
        this.i.ahz = new Thickness(2);
    }
    /**
     * Gets or sets the display text color.
    */
    get titleTextColor() {
        return brushToString(this.i.ahi);
    }
    set titleTextColor(v) {
        this.i.ahi = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the display text.
    */
    get titleTextStyle() {
        if (this.i.aa9 == null) {
            return null;
        }
        return this.i.aa9.fontString;
    }
    set titleTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa9 = fi;
    }
    /**
     * 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 labelDisplayMode() {
        return this.i.z8;
    }
    set labelDisplayMode(v) {
        this.i.z8 = ensureEnum(DataLegendLabelMode_$type, v);
    }
    /**
     * Gets or sets the units text color.
    */
    get labelTextColor() {
        return brushToString(this.i.ahd);
    }
    set labelTextColor(v) {
        this.i.ahd = stringToBrush(v);
    }
    get labelTextMarginBottom() {
        return this.i.ahw ? this.i.ahw.bottom : NaN;
    }
    set labelTextMarginBottom(v) {
        this.ensureLabelTextMargin();
        this.i.ahw.bottom = +v;
        this.i.ahw = this.i.ahw;
    }
    get labelTextMarginLeft() {
        return this.i.ahw ? this.i.ahw.left : NaN;
    }
    set labelTextMarginLeft(v) {
        this.ensureLabelTextMargin();
        this.i.ahw.left = +v;
        this.i.ahw = this.i.ahw;
    }
    get labelTextMarginRight() {
        return this.i.ahw ? this.i.ahw.right : NaN;
    }
    set labelTextMarginRight(v) {
        this.ensureLabelTextMargin();
        this.i.ahw.right = +v;
        this.i.ahw = this.i.ahw;
    }
    get labelTextMarginTop() {
        return this.i.ahw ? this.i.ahw.top : NaN;
    }
    set labelTextMarginTop(v) {
        this.ensureLabelTextMargin();
        this.i.ahw.top = +v;
        this.i.ahw = this.i.ahw;
    }
    ensureLabelTextMargin() {
        if (this.i.ahw) {
            return;
        }
        this.i.ahw = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get labelTextStyle() {
        if (this.i.aa4 == null) {
            return null;
        }
        return this.i.aa4.fontString;
    }
    set labelTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa4 = fi;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) {
            return this.targetAxis;
        }
        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;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.targetAxis && this.targetAxis._styling) {
            this.targetAxis._styling(container, component, this);
        }
        this._inStyling = false;
    }
    /**
     * Hides any tooltips presented by the layer, if any.
    
    */
    hideToolTips() {
        this.i.p5();
    }
    /**
     * Hides any tooltips presented by the layer, if any.
    
    */
    hideToolTipsImmediate() {
        this.i.p6();
    }
}
