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.ep;
    }
    /**
     * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present.
    */
    get isDefaultTooltipBehaviorDisabled() {
        return this.i.e0;
    }
    /**
     * 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.zy;
        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.zy = null : this.i.zy = v.i;
    }
    /**
     * Gets or sets whether to use value interpolation when drawing the tooltips.
    */
    get useInterpolation() {
        return this.i.abg;
    }
    set useInterpolation(v) {
        this.i.abg = ensureBool(v);
    }
    /**
     * Gets or sets the grouping mode to apply to use for the tooltip layer.
    */
    get groupingMode() {
        return this.i.aah;
    }
    set groupingMode(v) {
        this.i.aah = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
    }
    /**
     * Gets the actual resolved tooltip layer grouping mode.
    */
    get actualGroupingMode() {
        return this.i.aag;
    }
    set actualGroupingMode(v) {
        this.i.aag = ensureEnum(DataToolTipLayerGroupingMode_$type, v);
    }
    /**
     * Gets or sets the offset of the tooltip layer on the X axis.
    */
    get positionOffsetX() {
        return this.i.abp;
    }
    set positionOffsetX(v) {
        this.i.abp = +v;
    }
    /**
     * Gets or sets the offset of the tooltip layer on the Y axis.
    */
    get positionOffsetY() {
        return this.i.abq;
    }
    set positionOffsetY(v) {
        this.i.abq = +v;
    }
    /**
     * Gets or sets the default offset of the tooltip layer on the X axis.
    */
    get defaultPositionOffsetX() {
        return this.i.abn;
    }
    set defaultPositionOffsetX(v) {
        this.i.abn = +v;
    }
    /**
     * Gets or sets the default offset of the tooltip layer on the Y axis.
    */
    get defaultPositionOffsetY() {
        return this.i.abo;
    }
    set defaultPositionOffsetY(v) {
        this.i.abo = +v;
    }
    /**
     * Gets or sets the tooltip position mode on the X axis for grouped series.
    */
    get groupedPositionModeX() {
        return this.i.z9;
    }
    set groupedPositionModeX(v) {
        this.i.z9 = ensureEnum(DataTooltipGroupedPositionX_$type, v);
    }
    /**
     * Gets the actual resolved tooltip position mode on the X axis for grouped series.
    */
    get actualGroupedPositionModeX() {
        return this.i.z8;
    }
    set actualGroupedPositionModeX(v) {
        this.i.z8 = ensureEnum(DataTooltipGroupedPositionX_$type, v);
    }
    /**
     * Gets or sets the tooltip position mode on the Y axis for grouped series.
    */
    get groupedPositionModeY() {
        return this.i.aad;
    }
    set groupedPositionModeY(v) {
        this.i.aad = ensureEnum(DataTooltipGroupedPositionY_$type, v);
    }
    /**
     * Gets the actual resolved tooltip position mode on the Y axis for grouped series.
    */
    get actualGroupedPositionModeY() {
        return this.i.aac;
    }
    set actualGroupedPositionModeY(v) {
        this.i.aac = ensureEnum(DataTooltipGroupedPositionY_$type, v);
    }
    /**
     * Gets or sets whether the data legend should update when the series data is mutated.
    */
    get shouldUpdateWhenSeriesDataChanges() {
        return this.i.abf;
    }
    set shouldUpdateWhenSeriesDataChanges(v) {
        this.i.abf = 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.zv;
    }
    set includedSeries(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 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.zq;
    }
    set excludedSeries(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zq = 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.zu;
    }
    set includedColumns(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zu = 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.zp;
    }
    set excludedColumns(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zp = 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.zz;
    }
    set valueFormatAbbreviation(v) {
        this.i.zz = 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.acp;
    }
    set valueFormatMaxFractions(v) {
        this.i.acp = +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.acq;
    }
    set valueFormatMinFractions(v) {
        this.i.acq = +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.z6;
    }
    set valueFormatMode(v) {
        this.i.z6 = 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.aeq;
    }
    set valueFormatCulture(v) {
        this.i.aeq = 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.abh;
    }
    set valueFormatUseGrouping(v) {
        this.i.abh = ensureBool(v);
    }
    /**
     * Gets or sets the format string for values displayed in the data legend.
    */
    get valueFormatString() {
        return this.i.aew;
    }
    set valueFormatString(v) {
        this.i.aew = v;
    }
    /**
     * Gets or sets the format specifiers to use with the ValueFormatString string.
    */
    get valueFormatSpecifiers() {
        return this.i.zw;
    }
    set valueFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zw = v;
    }
    get valueRowMarginBottom() {
        return this.i.ahv ? this.i.ahv.bottom : NaN;
    }
    set valueRowMarginBottom(v) {
        this.ensureValueRowMargin();
        this.i.ahv.bottom = +v;
        this.i.ahv = this.i.ahv;
    }
    get valueRowMarginLeft() {
        return this.i.ahv ? this.i.ahv.left : NaN;
    }
    set valueRowMarginLeft(v) {
        this.ensureValueRowMargin();
        this.i.ahv.left = +v;
        this.i.ahv = this.i.ahv;
    }
    get valueRowMarginRight() {
        return this.i.ahv ? this.i.ahv.right : NaN;
    }
    set valueRowMarginRight(v) {
        this.ensureValueRowMargin();
        this.i.ahv.right = +v;
        this.i.ahv = this.i.ahv;
    }
    get valueRowMarginTop() {
        return this.i.ahv ? this.i.ahv.top : NaN;
    }
    set valueRowMarginTop(v) {
        this.ensureValueRowMargin();
        this.i.ahv.top = +v;
        this.i.ahv = this.i.ahv;
    }
    ensureValueRowMargin() {
        if (this.i.ahv) {
            return;
        }
        this.i.ahv = new Thickness(2);
    }
    /**
     * Gets or sets whether to show series rows.
    */
    get valueRowVisible() {
        return this.i.abi;
    }
    set valueRowVisible(v) {
        this.i.abi = ensureBool(v);
    }
    /**
     * Gets or sets text displayed when data column is missing a value, e.g. "no data"
    */
    get valueTextWhenMissingData() {
        return this.i.ae5;
    }
    set valueTextWhenMissingData(v) {
        this.i.ae5 = v;
    }
    /**
     * Gets or sets whether to use series colors when displaying values in the legend
    */
    get valueTextUseSeriesColors() {
        return this.i.abj;
    }
    set valueTextUseSeriesColors(v) {
        this.i.abj = ensureBool(v);
    }
    get valueTextMarginBottom() {
        return this.i.ahw ? this.i.ahw.bottom : NaN;
    }
    set valueTextMarginBottom(v) {
        this.ensureValueTextMargin();
        this.i.ahw.bottom = +v;
        this.i.ahw = this.i.ahw;
    }
    get valueTextMarginLeft() {
        return this.i.ahw ? this.i.ahw.left : NaN;
    }
    set valueTextMarginLeft(v) {
        this.ensureValueTextMargin();
        this.i.ahw.left = +v;
        this.i.ahw = this.i.ahw;
    }
    get valueTextMarginRight() {
        return this.i.ahw ? this.i.ahw.right : NaN;
    }
    set valueTextMarginRight(v) {
        this.ensureValueTextMargin();
        this.i.ahw.right = +v;
        this.i.ahw = this.i.ahw;
    }
    get valueTextMarginTop() {
        return this.i.ahw ? this.i.ahw.top : NaN;
    }
    set valueTextMarginTop(v) {
        this.ensureValueTextMargin();
        this.i.ahw.top = +v;
        this.i.ahw = this.i.ahw;
    }
    ensureValueTextMargin() {
        if (this.i.ahw) {
            return;
        }
        this.i.ahw = new Thickness(2);
    }
    /**
     * Gets or sets the units text color.
    */
    get valueTextColor() {
        return brushToString(this.i.ahe);
    }
    set valueTextColor(v) {
        this.i.ahe = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get valueTextStyle() {
        if (this.i.aa5 == null) {
            return null;
        }
        return this.i.aa5.fontString;
    }
    set valueTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa5 = fi;
    }
    /**
     * Gets or sets the format string for header text displayed in the data legend.
    */
    get headerFormatString() {
        return this.i.add;
    }
    set headerFormatString(v) {
        this.i.add = v;
    }
    /**
     * Gets or sets the format specifiers to use with the HeaderFormatString string.
    */
    get headerFormatSpecifiers() {
        return this.i.zt;
    }
    set headerFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.zt = 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.ac9;
    }
    set headerFormatCulture(v) {
        this.i.ac9 = v;
    }
    /**
     * Gets or sets date format for the header
     * This property is ignored when setting HeaderFormatSpecifiers or HeaderFormatString properties
    */
    get headerFormatDate() {
        return this.i.z0;
    }
    set headerFormatDate(v) {
        this.i.z0 = 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.z1;
    }
    set headerFormatTime(v) {
        this.i.z1 = ensureEnum(DataLegendHeaderTimeMode_$type, v);
    }
    /**
     * Gets or sets the HeaderText for the data legend.
    */
    get headerText() {
        return this.i.adi;
    }
    set headerText(v) {
        this.i.adi = v;
    }
    /**
     * Gets or sets the header text color.
    */
    get headerTextColor() {
        return brushToString(this.i.ag6);
    }
    set headerTextColor(v) {
        this.i.ag6 = stringToBrush(v);
    }
    get headerTextMarginBottom() {
        return this.i.ahp ? this.i.ahp.bottom : NaN;
    }
    set headerTextMarginBottom(v) {
        this.ensureHeaderTextMargin();
        this.i.ahp.bottom = +v;
        this.i.ahp = this.i.ahp;
    }
    get headerTextMarginLeft() {
        return this.i.ahp ? this.i.ahp.left : NaN;
    }
    set headerTextMarginLeft(v) {
        this.ensureHeaderTextMargin();
        this.i.ahp.left = +v;
        this.i.ahp = this.i.ahp;
    }
    get headerTextMarginRight() {
        return this.i.ahp ? this.i.ahp.right : NaN;
    }
    set headerTextMarginRight(v) {
        this.ensureHeaderTextMargin();
        this.i.ahp.right = +v;
        this.i.ahp = this.i.ahp;
    }
    get headerTextMarginTop() {
        return this.i.ahp ? this.i.ahp.top : NaN;
    }
    set headerTextMarginTop(v) {
        this.ensureHeaderTextMargin();
        this.i.ahp.top = +v;
        this.i.ahp = this.i.ahp;
    }
    ensureHeaderTextMargin() {
        if (this.i.ahp) {
            return;
        }
        this.i.ahp = new Thickness(2);
    }
    get headerRowMarginBottom() {
        return this.i.aho ? this.i.aho.bottom : NaN;
    }
    set headerRowMarginBottom(v) {
        this.ensureHeaderRowMargin();
        this.i.aho.bottom = +v;
        this.i.aho = this.i.aho;
    }
    get headerRowMarginLeft() {
        return this.i.aho ? this.i.aho.left : NaN;
    }
    set headerRowMarginLeft(v) {
        this.ensureHeaderRowMargin();
        this.i.aho.left = +v;
        this.i.aho = this.i.aho;
    }
    get headerRowMarginRight() {
        return this.i.aho ? this.i.aho.right : NaN;
    }
    set headerRowMarginRight(v) {
        this.ensureHeaderRowMargin();
        this.i.aho.right = +v;
        this.i.aho = this.i.aho;
    }
    get headerRowMarginTop() {
        return this.i.aho ? this.i.aho.top : NaN;
    }
    set headerRowMarginTop(v) {
        this.ensureHeaderRowMargin();
        this.i.aho.top = +v;
        this.i.aho = this.i.aho;
    }
    ensureHeaderRowMargin() {
        if (this.i.aho) {
            return;
        }
        this.i.aho = new Thickness(2);
    }
    /**
     * Gets or sets whether to show Header row.
    */
    get headerRowVisible() {
        return this.i.aa8;
    }
    set headerRowVisible(v) {
        this.i.aa8 = ensureBool(v);
    }
    /**
     * Gets or Sets the style to use for the header text.
    */
    get headerTextStyle() {
        if (this.i.aax == null) {
            return null;
        }
        return this.i.aax.fontString;
    }
    set headerTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aax = fi;
    }
    /**
     * Gets or sets whether to show Header row.
    */
    get groupRowVisible() {
        return this.i.aa7;
    }
    set groupRowVisible(v) {
        this.i.aa7 = ensureBool(v);
    }
    /**
     * Gets or sets the Group text color.
    */
    get groupTextColor() {
        return brushToString(this.i.ag5);
    }
    set groupTextColor(v) {
        this.i.ag5 = stringToBrush(v);
    }
    get groupTextMarginBottom() {
        return this.i.ahn ? this.i.ahn.bottom : NaN;
    }
    set groupTextMarginBottom(v) {
        this.ensureGroupTextMargin();
        this.i.ahn.bottom = +v;
        this.i.ahn = this.i.ahn;
    }
    get groupTextMarginLeft() {
        return this.i.ahn ? this.i.ahn.left : NaN;
    }
    set groupTextMarginLeft(v) {
        this.ensureGroupTextMargin();
        this.i.ahn.left = +v;
        this.i.ahn = this.i.ahn;
    }
    get groupTextMarginRight() {
        return this.i.ahn ? this.i.ahn.right : NaN;
    }
    set groupTextMarginRight(v) {
        this.ensureGroupTextMargin();
        this.i.ahn.right = +v;
        this.i.ahn = this.i.ahn;
    }
    get groupTextMarginTop() {
        return this.i.ahn ? this.i.ahn.top : NaN;
    }
    set groupTextMarginTop(v) {
        this.ensureGroupTextMargin();
        this.i.ahn.top = +v;
        this.i.ahn = this.i.ahn;
    }
    ensureGroupTextMargin() {
        if (this.i.ahn) {
            return;
        }
        this.i.ahn = new Thickness(2);
    }
    get groupRowMarginBottom() {
        return this.i.ahm ? this.i.ahm.bottom : NaN;
    }
    set groupRowMarginBottom(v) {
        this.ensureGroupRowMargin();
        this.i.ahm.bottom = +v;
        this.i.ahm = this.i.ahm;
    }
    get groupRowMarginLeft() {
        return this.i.ahm ? this.i.ahm.left : NaN;
    }
    set groupRowMarginLeft(v) {
        this.ensureGroupRowMargin();
        this.i.ahm.left = +v;
        this.i.ahm = this.i.ahm;
    }
    get groupRowMarginRight() {
        return this.i.ahm ? this.i.ahm.right : NaN;
    }
    set groupRowMarginRight(v) {
        this.ensureGroupRowMargin();
        this.i.ahm.right = +v;
        this.i.ahm = this.i.ahm;
    }
    get groupRowMarginTop() {
        return this.i.ahm ? this.i.ahm.top : NaN;
    }
    set groupRowMarginTop(v) {
        this.ensureGroupRowMargin();
        this.i.ahm.top = +v;
        this.i.ahm = this.i.ahm;
    }
    ensureGroupRowMargin() {
        if (this.i.ahm) {
            return;
        }
        this.i.ahm = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the Group text.
    */
    get groupTextStyle() {
        if (this.i.aaw == null) {
            return null;
        }
        return this.i.aaw.fontString;
    }
    set groupTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aaw = fi;
    }
    /**
     * Gets or sets the summary text color.
    */
    get summaryTitleTextColor() {
        return brushToString(this.i.ag9);
    }
    set summaryTitleTextColor(v) {
        this.i.ag9 = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the summary text.
    */
    get summaryTitleTextStyle() {
        if (this.i.aa0 == null) {
            return null;
        }
        return this.i.aa0.fontString;
    }
    set summaryTitleTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa0 = fi;
    }
    /**
     * Gets or sets the SummaryType for the data legend.
    */
    get summaryType() {
        return this.i.z4;
    }
    set summaryType(v) {
        this.i.z4 = ensureEnum(DataLegendSummaryType_$type, v);
    }
    /**
     * Gets or sets the SummaryTitleText for the data legend.
    */
    get summaryTitleText() {
        return this.i.ad2;
    }
    set summaryTitleText(v) {
        this.i.ad2 = v;
    }
    get summaryTitleTextMarginBottom() {
        return this.i.ahs ? this.i.ahs.bottom : NaN;
    }
    set summaryTitleTextMarginBottom(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahs.bottom = +v;
        this.i.ahs = this.i.ahs;
    }
    get summaryTitleTextMarginLeft() {
        return this.i.ahs ? this.i.ahs.left : NaN;
    }
    set summaryTitleTextMarginLeft(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahs.left = +v;
        this.i.ahs = this.i.ahs;
    }
    get summaryTitleTextMarginRight() {
        return this.i.ahs ? this.i.ahs.right : NaN;
    }
    set summaryTitleTextMarginRight(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahs.right = +v;
        this.i.ahs = this.i.ahs;
    }
    get summaryTitleTextMarginTop() {
        return this.i.ahs ? this.i.ahs.top : NaN;
    }
    set summaryTitleTextMarginTop(v) {
        this.ensureSummaryTitleTextMargin();
        this.i.ahs.top = +v;
        this.i.ahs = this.i.ahs;
    }
    ensureSummaryTitleTextMargin() {
        if (this.i.ahs) {
            return;
        }
        this.i.ahs = new Thickness(2);
    }
    get summaryRowMarginBottom() {
        return this.i.ahr ? this.i.ahr.bottom : NaN;
    }
    set summaryRowMarginBottom(v) {
        this.ensureSummaryRowMargin();
        this.i.ahr.bottom = +v;
        this.i.ahr = this.i.ahr;
    }
    get summaryRowMarginLeft() {
        return this.i.ahr ? this.i.ahr.left : NaN;
    }
    set summaryRowMarginLeft(v) {
        this.ensureSummaryRowMargin();
        this.i.ahr.left = +v;
        this.i.ahr = this.i.ahr;
    }
    get summaryRowMarginRight() {
        return this.i.ahr ? this.i.ahr.right : NaN;
    }
    set summaryRowMarginRight(v) {
        this.ensureSummaryRowMargin();
        this.i.ahr.right = +v;
        this.i.ahr = this.i.ahr;
    }
    get summaryRowMarginTop() {
        return this.i.ahr ? this.i.ahr.top : NaN;
    }
    set summaryRowMarginTop(v) {
        this.ensureSummaryRowMargin();
        this.i.ahr.top = +v;
        this.i.ahr = this.i.ahr;
    }
    ensureSummaryRowMargin() {
        if (this.i.ahr) {
            return;
        }
        this.i.ahr = new Thickness(2);
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryValueTextColor() {
        return brushToString(this.i.ahb);
    }
    set summaryValueTextColor(v) {
        this.i.ahb = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryValueTextStyle() {
        if (this.i.aa2 == null) {
            return null;
        }
        return this.i.aa2.fontString;
    }
    set summaryValueTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa2 = fi;
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get summaryLabelText() {
        return this.i.adx;
    }
    set summaryLabelText(v) {
        this.i.adx = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryLabelTextColor() {
        return brushToString(this.i.ag8);
    }
    set summaryLabelTextColor(v) {
        this.i.ag8 = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryLabelTextStyle() {
        if (this.i.aaz == null) {
            return null;
        }
        return this.i.aaz.fontString;
    }
    set summaryLabelTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aaz = fi;
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get summaryUnitsText() {
        return this.i.ad8;
    }
    set summaryUnitsText(v) {
        this.i.ad8 = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get summaryUnitsTextColor() {
        return brushToString(this.i.aha);
    }
    set summaryUnitsTextColor(v) {
        this.i.aha = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get summaryUnitsTextStyle() {
        if (this.i.aa1 == null) {
            return null;
        }
        return this.i.aa1.fontString;
    }
    set summaryUnitsTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa1 = fi;
    }
    get badgeMarginBottom() {
        return this.i.ahl ? this.i.ahl.bottom : NaN;
    }
    set badgeMarginBottom(v) {
        this.ensureBadgeMargin();
        this.i.ahl.bottom = +v;
        this.i.ahl = this.i.ahl;
    }
    get badgeMarginLeft() {
        return this.i.ahl ? this.i.ahl.left : NaN;
    }
    set badgeMarginLeft(v) {
        this.ensureBadgeMargin();
        this.i.ahl.left = +v;
        this.i.ahl = this.i.ahl;
    }
    get badgeMarginRight() {
        return this.i.ahl ? this.i.ahl.right : NaN;
    }
    set badgeMarginRight(v) {
        this.ensureBadgeMargin();
        this.i.ahl.right = +v;
        this.i.ahl = this.i.ahl;
    }
    get badgeMarginTop() {
        return this.i.ahl ? this.i.ahl.top : NaN;
    }
    set badgeMarginTop(v) {
        this.ensureBadgeMargin();
        this.i.ahl.top = +v;
        this.i.ahl = this.i.ahl;
    }
    ensureBadgeMargin() {
        if (this.i.ahl) {
            return;
        }
        this.i.ahl = new Thickness(2);
    }
    /**
     * Gets or sets the BadgeShape for the data legend.
    */
    get badgeShape() {
        return this.i.aal;
    }
    set badgeShape(v) {
        this.i.aal = ensureEnum(LegendItemBadgeShape_$type, v);
    }
    /**
     * Gets or sets the layout of content in the data legend
    */
    get layoutMode() {
        return this.i.z3;
    }
    set layoutMode(v) {
        this.i.z3 = ensureEnum(DataLegendLayoutMode_$type, v);
    }
    /**
     * Gets or sets the UnitsMode for the data legend.
    */
    get unitsDisplayMode() {
        return this.i.z5;
    }
    set unitsDisplayMode(v) {
        this.i.z5 = ensureEnum(DataLegendUnitsMode_$type, v);
    }
    /**
     * Gets or sets the units text for the data legend.
    */
    get unitsText() {
        return this.i.aej;
    }
    set unitsText(v) {
        this.i.aej = v;
    }
    /**
     * Gets or sets the units text color.
    */
    get unitsTextColor() {
        return brushToString(this.i.ahd);
    }
    set unitsTextColor(v) {
        this.i.ahd = stringToBrush(v);
    }
    get unitsTextMarginBottom() {
        return this.i.ahu ? this.i.ahu.bottom : NaN;
    }
    set unitsTextMarginBottom(v) {
        this.ensureUnitsTextMargin();
        this.i.ahu.bottom = +v;
        this.i.ahu = this.i.ahu;
    }
    get unitsTextMarginLeft() {
        return this.i.ahu ? this.i.ahu.left : NaN;
    }
    set unitsTextMarginLeft(v) {
        this.ensureUnitsTextMargin();
        this.i.ahu.left = +v;
        this.i.ahu = this.i.ahu;
    }
    get unitsTextMarginRight() {
        return this.i.ahu ? this.i.ahu.right : NaN;
    }
    set unitsTextMarginRight(v) {
        this.ensureUnitsTextMargin();
        this.i.ahu.right = +v;
        this.i.ahu = this.i.ahu;
    }
    get unitsTextMarginTop() {
        return this.i.ahu ? this.i.ahu.top : NaN;
    }
    set unitsTextMarginTop(v) {
        this.ensureUnitsTextMargin();
        this.i.ahu.top = +v;
        this.i.ahu = this.i.ahu;
    }
    ensureUnitsTextMargin() {
        if (this.i.ahu) {
            return;
        }
        this.i.ahu = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get unitsTextStyle() {
        if (this.i.aa4 == null) {
            return null;
        }
        return this.i.aa4.fontString;
    }
    set unitsTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa4 = fi;
    }
    get titleTextMarginBottom() {
        return this.i.aht ? this.i.aht.bottom : NaN;
    }
    set titleTextMarginBottom(v) {
        this.ensureTitleTextMargin();
        this.i.aht.bottom = +v;
        this.i.aht = this.i.aht;
    }
    get titleTextMarginLeft() {
        return this.i.aht ? this.i.aht.left : NaN;
    }
    set titleTextMarginLeft(v) {
        this.ensureTitleTextMargin();
        this.i.aht.left = +v;
        this.i.aht = this.i.aht;
    }
    get titleTextMarginRight() {
        return this.i.aht ? this.i.aht.right : NaN;
    }
    set titleTextMarginRight(v) {
        this.ensureTitleTextMargin();
        this.i.aht.right = +v;
        this.i.aht = this.i.aht;
    }
    get titleTextMarginTop() {
        return this.i.aht ? this.i.aht.top : NaN;
    }
    set titleTextMarginTop(v) {
        this.ensureTitleTextMargin();
        this.i.aht.top = +v;
        this.i.aht = this.i.aht;
    }
    ensureTitleTextMargin() {
        if (this.i.aht) {
            return;
        }
        this.i.aht = new Thickness(2);
    }
    /**
     * Gets or sets the display text color.
    */
    get titleTextColor() {
        return brushToString(this.i.ahc);
    }
    set titleTextColor(v) {
        this.i.ahc = stringToBrush(v);
    }
    /**
     * Gets or Sets the style to use for the display text.
    */
    get titleTextStyle() {
        if (this.i.aa3 == null) {
            return null;
        }
        return this.i.aa3.fontString;
    }
    set titleTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aa3 = 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.z2;
    }
    set labelDisplayMode(v) {
        this.i.z2 = ensureEnum(DataLegendLabelMode_$type, v);
    }
    /**
     * Gets or sets the units text color.
    */
    get labelTextColor() {
        return brushToString(this.i.ag7);
    }
    set labelTextColor(v) {
        this.i.ag7 = stringToBrush(v);
    }
    get labelTextMarginBottom() {
        return this.i.ahq ? this.i.ahq.bottom : NaN;
    }
    set labelTextMarginBottom(v) {
        this.ensureLabelTextMargin();
        this.i.ahq.bottom = +v;
        this.i.ahq = this.i.ahq;
    }
    get labelTextMarginLeft() {
        return this.i.ahq ? this.i.ahq.left : NaN;
    }
    set labelTextMarginLeft(v) {
        this.ensureLabelTextMargin();
        this.i.ahq.left = +v;
        this.i.ahq = this.i.ahq;
    }
    get labelTextMarginRight() {
        return this.i.ahq ? this.i.ahq.right : NaN;
    }
    set labelTextMarginRight(v) {
        this.ensureLabelTextMargin();
        this.i.ahq.right = +v;
        this.i.ahq = this.i.ahq;
    }
    get labelTextMarginTop() {
        return this.i.ahq ? this.i.ahq.top : NaN;
    }
    set labelTextMarginTop(v) {
        this.ensureLabelTextMargin();
        this.i.ahq.top = +v;
        this.i.ahq = this.i.ahq;
    }
    ensureLabelTextMargin() {
        if (this.i.ahq) {
            return;
        }
        this.i.ahq = new Thickness(2);
    }
    /**
     * Gets or Sets the style to use for the units text.
    */
    get labelTextStyle() {
        if (this.i.aay == null) {
            return null;
        }
        return this.i.aay.fontString;
    }
    set labelTextStyle(v) {
        let fi = new FontInfo();
        fi.fontString = v;
        this.i.aay = 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.p2();
    }
    /**
     * Hides any tooltips presented by the layer, if any.
    
    */
    hideToolTipsImmediate() {
        this.i.p3();
    }
}
