/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, markType, IList_$type, Number_$type, typeCast, Array_$type, fromEn } from "igniteui-react-core/ES2015/type";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
import { boxArray$1 } from "igniteui-react-core/ES2015/array";
import { stringStartsWith } from "igniteui-react-core/ES2015/string";
export class FinancialChartRangeSelectorVisualData extends Base {
    constructor() {
        super(...arguments);
        this._visibility = null;
        this._buttonVisibilities = null;
        this._buttonLabels = null;
        this._buttonsChecked = null;
        this._buttonLefts = null;
        this._buttonTops = null;
        this._buttonWidths = null;
        this._buttonHeights = null;
        this._left = 0;
        this._top = 0;
        this._width = 0;
        this._height = 0;
    }
    get visibility() {
        return this._visibility;
    }
    set visibility(a) {
        this._visibility = a;
    }
    get buttonVisibilities() {
        return this._buttonVisibilities;
    }
    set buttonVisibilities(a) {
        this._buttonVisibilities = a;
    }
    get buttonLabels() {
        return this._buttonLabels;
    }
    set buttonLabels(a) {
        this._buttonLabels = a;
    }
    get buttonsChecked() {
        return this._buttonsChecked;
    }
    set buttonsChecked(a) {
        this._buttonsChecked = a;
    }
    get buttonLefts() {
        return this._buttonLefts;
    }
    set buttonLefts(a) {
        this._buttonLefts = a;
    }
    get buttonTops() {
        return this._buttonTops;
    }
    set buttonTops(a) {
        this._buttonTops = a;
    }
    get buttonWidths() {
        return this._buttonWidths;
    }
    set buttonWidths(a) {
        this._buttonWidths = a;
    }
    get buttonHeights() {
        return this._buttonHeights;
    }
    set buttonHeights(a) {
        this._buttonHeights = a;
    }
    get left() {
        return this._left;
    }
    set left(a) {
        this._left = a;
    }
    get top() {
        return this._top;
    }
    set top(a) {
        this._top = a;
    }
    get width() {
        return this._width;
    }
    set width(a) {
        this._width = a;
    }
    get height() {
        return this._height;
    }
    set height(a) {
        this._height = a;
    }
    serialize() {
        return FinancialChartVisualData.t(["buttonLabels", "buttonsChecked", "buttonLefts", "buttonTops", "buttonWidths", "buttonHeights", "left", "top", "width", "height"], [this.buttonLabels, this.buttonsChecked, this.buttonLefts, this.buttonTops, this.buttonWidths, this.buttonHeights, this.left, this.top, this.width, this.height]);
    }
}
FinancialChartRangeSelectorVisualData.$t = markType(FinancialChartRangeSelectorVisualData, 'FinancialChartRangeSelectorVisualData');
export class FinancialChartEnumPickerVisualData extends Base {
    constructor() {
        super(...arguments);
        this.a = null;
        this.g = null;
        this.d = 0;
        this.e = 0;
        this.f = 0;
        this.c = 0;
        this.b = false;
    }
    h() {
        return FinancialChartVisualData.t(["items", "selectedItem", "left", "top", "width", "height", "isVisible"], [this.a, this.g, this.d, this.e, this.f, this.c, this.b]);
    }
}
FinancialChartEnumPickerVisualData.$t = markType(FinancialChartEnumPickerVisualData, 'FinancialChartEnumPickerVisualData');
export class FinancialChartEnumCollectionPickerVisualData extends Base {
    constructor() {
        super(...arguments);
        this.a = null;
        this.b = null;
        this.k = 0;
        this.l = 0;
        this.m = 0;
        this.j = 0;
        this.f = 0;
        this.g = 0;
        this.h = 0;
        this.e = 0;
        this.n = 0;
        this.i = 0;
        this.d = false;
        this.c = false;
    }
    o() {
        return FinancialChartVisualData.t(["items", "selectedItems", "pickerLeft", "pickerTop", "pickerWidth", "pickerHeight", "buttonLeft", "buttonTop", "buttonWidth", "buttonHeight", "width", "height", "isVisible", "isPickerVisible"], [this.a, this.b, this.k, this.l, this.m, this.j, this.f, this.g, this.h, this.e, this.n, this.i, this.d, this.c]);
    }
}
FinancialChartEnumCollectionPickerVisualData.$t = markType(FinancialChartEnumCollectionPickerVisualData, 'FinancialChartEnumCollectionPickerVisualData');
export class FinancialChartToolbarVisualData extends Base {
    constructor() {
        super(...arguments);
        this._indicatorPicker = null;
        this._overlayPicker = null;
        this._trendLineTypePicker = null;
        this._chartTypePicker = null;
        this._volumeTypePicker = null;
        this._rangeSelector = null;
    }
    get indicatorPicker() {
        return this._indicatorPicker;
    }
    set indicatorPicker(a) {
        this._indicatorPicker = a;
    }
    get overlayPicker() {
        return this._overlayPicker;
    }
    set overlayPicker(a) {
        this._overlayPicker = a;
    }
    get trendLineTypePicker() {
        return this._trendLineTypePicker;
    }
    set trendLineTypePicker(a) {
        this._trendLineTypePicker = a;
    }
    get chartTypePicker() {
        return this._chartTypePicker;
    }
    set chartTypePicker(a) {
        this._chartTypePicker = a;
    }
    get volumeTypePicker() {
        return this._volumeTypePicker;
    }
    set volumeTypePicker(a) {
        this._volumeTypePicker = a;
    }
    get rangeSelector() {
        return this._rangeSelector;
    }
    set rangeSelector(a) {
        this._rangeSelector = a;
    }
    serialize() {
        return FinancialChartVisualData.t(["indicatorPicker", "overlayPicker", "trendLineTypePicker", "chartTypePicker", "volumeTypePicker", "rangeSelector"], [this.indicatorPicker.o(), this.overlayPicker.o(), this.trendLineTypePicker.h(), this.chartTypePicker.h(), this.volumeTypePicker.h(), this.rangeSelector.serialize()]);
    }
}
FinancialChartToolbarVisualData.$t = markType(FinancialChartToolbarVisualData, 'FinancialChartToolbarVisualData');
export class FinancialChartVisualData extends Base {
    constructor() {
        super();
        this._mainChart = null;
        this._volumeChart = null;
        this._indicatorCharts = null;
        this._toolbar = null;
        this._zoomChart = null;
        this._mainChartLeft = 0;
        this._mainChartTop = 0;
        this._volumeChartLeft = 0;
        this._volumeChartTop = 0;
        this._indicatorChartLefts = null;
        this._indicatorChartTops = null;
        this._zoomChartLeft = 0;
        this._zoomChartTop = 0;
        this._toolbarLeft = 0;
        this._toolbarTop = 0;
        this._toolbarWidth = 0;
        this._toolbarHeight = 0;
        this.mainChartLeft = NaN;
        this.mainChartTop = NaN;
        this.volumeChartLeft = NaN;
        this.volumeChartTop = NaN;
        this.zoomChartLeft = NaN;
        this.zoomChartTop = NaN;
        this.indicatorChartLefts = new List$1(Number_$type, 0);
        this.indicatorChartTops = new List$1(Number_$type, 0);
    }
    get mainChart() {
        return this._mainChart;
    }
    set mainChart(a) {
        this._mainChart = a;
    }
    get volumeChart() {
        return this._volumeChart;
    }
    set volumeChart(a) {
        this._volumeChart = a;
    }
    get indicatorCharts() {
        return this._indicatorCharts;
    }
    set indicatorCharts(a) {
        this._indicatorCharts = a;
    }
    get toolbar() {
        return this._toolbar;
    }
    set toolbar(a) {
        this._toolbar = a;
    }
    get zoomChart() {
        return this._zoomChart;
    }
    set zoomChart(a) {
        this._zoomChart = a;
    }
    get mainChartLeft() {
        return this._mainChartLeft;
    }
    set mainChartLeft(a) {
        this._mainChartLeft = a;
    }
    get mainChartTop() {
        return this._mainChartTop;
    }
    set mainChartTop(a) {
        this._mainChartTop = a;
    }
    get volumeChartLeft() {
        return this._volumeChartLeft;
    }
    set volumeChartLeft(a) {
        this._volumeChartLeft = a;
    }
    get volumeChartTop() {
        return this._volumeChartTop;
    }
    set volumeChartTop(a) {
        this._volumeChartTop = a;
    }
    get indicatorChartLefts() {
        return this._indicatorChartLefts;
    }
    set indicatorChartLefts(a) {
        this._indicatorChartLefts = a;
    }
    get indicatorChartTops() {
        return this._indicatorChartTops;
    }
    set indicatorChartTops(a) {
        this._indicatorChartTops = a;
    }
    get zoomChartLeft() {
        return this._zoomChartLeft;
    }
    set zoomChartLeft(a) {
        this._zoomChartLeft = a;
    }
    get zoomChartTop() {
        return this._zoomChartTop;
    }
    set zoomChartTop(a) {
        this._zoomChartTop = a;
    }
    get toolbarLeft() {
        return this._toolbarLeft;
    }
    set toolbarLeft(a) {
        this._toolbarLeft = a;
    }
    get toolbarTop() {
        return this._toolbarTop;
    }
    set toolbarTop(a) {
        this._toolbarTop = a;
    }
    get toolbarWidth() {
        return this._toolbarWidth;
    }
    set toolbarWidth(a) {
        this._toolbarWidth = a;
    }
    get toolbarHeight() {
        return this._toolbarHeight;
    }
    set toolbarHeight(a) {
        this._toolbarHeight = a;
    }
    w(a) {
        if (a != null) {
            let chart_ = a;
            chart_.scaleByViewport();
        }
    }
    scaleByViewport() {
        this.w(this.mainChart);
        this.w(this.volumeChart);
        if (this.indicatorCharts != null) {
            for (let a = 0; a < this.indicatorCharts.count; a++) {
                this.w(this.indicatorCharts._inner[a]);
            }
        }
        this.w(this.zoomChart);
    }
    r(a) {
        if (a != null) {
            let chart_ = a;
            return (chart_.serialize());
        }
        return null;
    }
    serialize() {
        let a = new StringBuilder(0);
        a.u("{");
        if (this.volumeChart != null) {
            a.u("volumeChart: " + this.r(this.volumeChart) + ",");
        }
        if (this.zoomChart != null) {
            a.u("zoomChart: " + this.r(this.zoomChart) + ",");
        }
        if (this.indicatorCharts != null) {
            a.u("indicatorCharts: [");
            for (let b = 0; b < this.indicatorCharts.count; b++) {
                if (b > 0) {
                    a.u(",");
                }
                a.l(this.r(this.indicatorCharts._inner[b]));
            }
            a.t();
            a.u("],");
        }
        if (this.toolbar != null) {
            a.u("toolbar: " + this.toolbar.serialize() + ",");
        }
        if (this.mainChart != null) {
            a.u("mainChart: " + this.r(this.mainChart) + ",");
        }
        a.u("mainChartLeft: " + this.mainChartLeft.toString() + ",");
        a.u("mainChartTop: " + this.mainChartTop.toString() + ",");
        a.u("volumeChartLeft: " + this.volumeChartLeft.toString() + ",");
        a.u("volumeChartTop: " + this.volumeChartTop.toString() + ",");
        a.u("zoomChartLeft: " + this.zoomChartLeft.toString() + ",");
        a.u("zoomChartTop: " + this.zoomChartTop.toString() + ",");
        a.u("toolbarLeft: " + this.toolbarLeft.toString() + ",");
        a.u("toolbarTop: " + this.toolbarTop.toString() + ",");
        a.u("toolbarWidth: " + this.toolbarWidth.toString() + ",");
        a.u("ToolbarHeight: " + this.toolbarHeight.toString() + ",");
        a.u("indicatorChartLefts: [");
        for (let c = 0; c < this.indicatorChartLefts.count; c++) {
            if (c > 0) {
                a.u(",");
            }
            a.k(this.indicatorChartLefts._inner[c]);
        }
        a.t();
        a.u("],");
        a.u("indicatorChartTops: [");
        for (let d = 0; d < this.indicatorChartTops.count; d++) {
            if (d > 0) {
                a.u(",");
            }
            a.k(this.indicatorChartTops._inner[d]);
        }
        a.t();
        a.u("]");
        a.u("}");
        return a.toString();
    }
    static t(a, b) {
        let c = new StringBuilder(0);
        c.u("{");
        for (let d = 0; d < a.length; d++) {
            c.l(a[d] + ": " + FinancialChartVisualData.v(b[d]));
            if (d < a.length - 1) {
                c.l(", ");
            }
            c.t();
        }
        c.l("}");
        return c.toString();
    }
    static v(a) {
        if (a == null) {
            return "null";
        }
        if (typeof a === 'string' && !stringStartsWith(a, "{")) {
            return "\"" + a + "\"";
        }
        if (typeCast(IList_$type, a) !== null) {
            return FinancialChartVisualData.u(a);
        }
        if (typeCast(Array_$type, a) !== null) {
            return FinancialChartVisualData.u(boxArray$1(a));
        }
        return a.toString();
    }
    static u(a) {
        if (a == null) {
            return "null";
        }
        let b = new StringBuilder(0);
        b.l("[");
        let c = 0;
        for (let d of fromEn(a)) {
            b.l(FinancialChartVisualData.v(d));
            if (++c < a.count) {
                b.l(", ");
            }
        }
        b.l("]");
        return b.toString();
    }
}
FinancialChartVisualData.$t = markType(FinancialChartVisualData, 'FinancialChartVisualData');
