/*
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, typeCast, Boolean_$type, String_$type, fromEnum, markType } from "igniteui-angular-core";
import { IVisualData_$type } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { RectData } from "igniteui-angular-core";
import { ColorData } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
import { stringJoin, stringReplace } from "igniteui-angular-core";
/**
 * @hidden
 */
export let DataLegendVisualData = /*@__PURE__*/ (() => {
    class DataLegendVisualData extends Base {
        constructor() {
            super();
            this._rows = null;
            this._viewport = null;
            this._width = 0;
            this._height = 0;
            this.rows = new List$1(DataLegendVisualDataRow.$, 0);
        }
        static serialize1(a) {
            let b = typeCast(RectData.$, a);
            if (b != null) {
                return "{ left: " + b.left + ", top: " + b.top + ", width: " + b.width + ", height: " + b.height + " }";
            }
            let c = typeCast(ColorData.$, a);
            if (c != null) {
                return "{ a: " + c.a + ", r: " + c.r + ", g: " + c.g + ", b: " + c.b + " }";
            }
            let d = typeCast(IVisualData_$type, a);
            if (d != null) {
                return "\"" + d.serialize() + "\"";
            }
            if (typeof a === 'number' || typeof a === 'number' || typeCast(Boolean_$type, a) !== null) {
                return "" + a.toString() + "";
            }
            return "\"" + (a != null ? a.toString() : "null") + "\"";
        }
        get rows() {
            return this._rows;
        }
        set rows(a) {
            this._rows = a;
        }
        get viewport() {
            return this._viewport;
        }
        set viewport(a) {
            this._viewport = a;
        }
        get width() {
            return this._width;
        }
        set width(a) {
            this._width = a;
        }
        get height() {
            return this._height;
        }
        set height(a) {
            this._height = a;
        }
        serialize() {
            let a = ", ";
            let b = "   ";
            let c = new StringBuilder(0);
            c.u("{");
            c.u(this.e("width") + this.width + a);
            c.u(this.e("height") + this.height + a);
            c.u(this.e("viewport") + DataLegendVisualData.serialize1(this.viewport) + a);
            let d = new List$1(String_$type, 0);
            for (let e of fromEnum(this.rows)) {
                d.add(e.serialize());
            }
            c.u(this.e("rows") + "[");
            c.u(stringJoin(", \n", ...d.toArray()));
            c.u("]");
            c.u("}");
            return c.toString();
        }
        e(a) {
            return a + ": ";
        }
    }
    DataLegendVisualData.$t = markType(DataLegendVisualData, 'DataLegendVisualData', Base.$, [IVisualData_$type]);
    return DataLegendVisualData;
})();
/**
 * @hidden
 */
export let DataLegendVisualDataColumn = /*@__PURE__*/ (() => {
    class DataLegendVisualDataColumn extends Base {
        constructor() {
            super();
            this._text = null;
            this._bounds = null;
            this._textColor = null;
            this._fontFamily = null;
            this._fontSize = 0;
            this._fontWeight = null;
            this._fontStyle = null;
            this._fontStretch = null;
            this._marginLeft = 0;
            this._marginRight = 0;
            this._marginTop = 0;
            this._marginBottom = 0;
            this.bounds = RectData.empty;
        }
        get text() {
            return this._text;
        }
        set text(a) {
            this._text = a;
        }
        get bounds() {
            return this._bounds;
        }
        set bounds(a) {
            this._bounds = a;
        }
        get textColor() {
            return this._textColor;
        }
        set textColor(a) {
            this._textColor = a;
        }
        get fontFamily() {
            return this._fontFamily;
        }
        set fontFamily(a) {
            this._fontFamily = a;
        }
        get fontSize() {
            return this._fontSize;
        }
        set fontSize(a) {
            this._fontSize = a;
        }
        get fontWeight() {
            return this._fontWeight;
        }
        set fontWeight(a) {
            this._fontWeight = a;
        }
        get fontStyle() {
            return this._fontStyle;
        }
        set fontStyle(a) {
            this._fontStyle = a;
        }
        get fontStretch() {
            return this._fontStretch;
        }
        set fontStretch(a) {
            this._fontStretch = a;
        }
        get marginLeft() {
            return this._marginLeft;
        }
        set marginLeft(a) {
            this._marginLeft = a;
        }
        get marginRight() {
            return this._marginRight;
        }
        set marginRight(a) {
            this._marginRight = a;
        }
        get marginTop() {
            return this._marginTop;
        }
        set marginTop(a) {
            this._marginTop = a;
        }
        get marginBottom() {
            return this._marginBottom;
        }
        set marginBottom(a) {
            this._marginBottom = a;
        }
        serialize() {
            let a = ", ";
            let b = "      ";
            let c = new StringBuilder(0);
            c.u("{");
            c.u(b + this.l("bounds") + DataLegendVisualData.serialize1(this.bounds) + a);
            c.u(b + this.l("text") + DataLegendVisualData.serialize1(this.text) + a);
            c.u(b + this.l("textColor") + DataLegendVisualData.serialize1(this.textColor) + a);
            c.u(b + this.l("marginTop") + DataLegendVisualData.serialize1(this.marginTop) + a);
            c.u(b + this.l("marginLeft") + DataLegendVisualData.serialize1(this.marginLeft) + a);
            c.u(b + this.l("marginRight") + DataLegendVisualData.serialize1(this.marginRight) + a);
            c.u(b + this.l("marginBottom") + DataLegendVisualData.serialize1(this.marginBottom) + a);
            let d = "\"" + (this.fontFamily != null ? stringReplace(this.fontFamily, '\"', '\'') : "null") + "\"";
            c.u(b + this.l("fontFamily") + d + a);
            c.u(b + this.l("fontSize") + DataLegendVisualData.serialize1(this.fontSize) + a);
            c.u(b + this.l("fontWeight") + DataLegendVisualData.serialize1(this.fontWeight) + a);
            c.u(b + this.l("fontStyle") + DataLegendVisualData.serialize1(this.fontStyle) + a);
            c.u(b + this.l("fontStretch") + DataLegendVisualData.serialize1(this.fontStretch));
            c.u(b + "}");
            return c.toString();
        }
        l(a) {
            return a + ": ";
        }
    }
    DataLegendVisualDataColumn.$t = markType(DataLegendVisualDataColumn, 'DataLegendVisualDataColumn');
    return DataLegendVisualDataColumn;
})();
/**
 * @hidden
 */
export let DataLegendVisualDataRow = /*@__PURE__*/ (() => {
    class DataLegendVisualDataRow extends Base {
        constructor() {
            super();
            this._columns = null;
            this._seriesIndex = 0;
            this._badgeBounds = null;
            this._badgeMarginLeft = 0;
            this._badgeMarginTop = 0;
            this._badgeMarginRight = 0;
            this._badgeMarginBottom = 0;
            this._badgeShape = null;
            this._rowBounds = null;
            this._rowMarginLeft = 0;
            this._rowMarginTop = 0;
            this._rowMarginRight = 0;
            this._rowMarginBottom = 0;
            this.badgeShape = "None";
            this.columns = new List$1(DataLegendVisualDataColumn.$, 0);
        }
        get columns() {
            return this._columns;
        }
        set columns(a) {
            this._columns = a;
        }
        get seriesIndex() {
            return this._seriesIndex;
        }
        set seriesIndex(a) {
            this._seriesIndex = a;
        }
        get badgeBounds() {
            return this._badgeBounds;
        }
        set badgeBounds(a) {
            this._badgeBounds = a;
        }
        get badgeMarginLeft() {
            return this._badgeMarginLeft;
        }
        set badgeMarginLeft(a) {
            this._badgeMarginLeft = a;
        }
        get badgeMarginTop() {
            return this._badgeMarginTop;
        }
        set badgeMarginTop(a) {
            this._badgeMarginTop = a;
        }
        get badgeMarginRight() {
            return this._badgeMarginRight;
        }
        set badgeMarginRight(a) {
            this._badgeMarginRight = a;
        }
        get badgeMarginBottom() {
            return this._badgeMarginBottom;
        }
        set badgeMarginBottom(a) {
            this._badgeMarginBottom = a;
        }
        get badgeShape() {
            return this._badgeShape;
        }
        set badgeShape(a) {
            this._badgeShape = a;
        }
        get rowBounds() {
            return this._rowBounds;
        }
        set rowBounds(a) {
            this._rowBounds = a;
        }
        get rowMarginLeft() {
            return this._rowMarginLeft;
        }
        set rowMarginLeft(a) {
            this._rowMarginLeft = a;
        }
        get rowMarginTop() {
            return this._rowMarginTop;
        }
        set rowMarginTop(a) {
            this._rowMarginTop = a;
        }
        get rowMarginRight() {
            return this._rowMarginRight;
        }
        set rowMarginRight(a) {
            this._rowMarginRight = a;
        }
        get rowMarginBottom() {
            return this._rowMarginBottom;
        }
        set rowMarginBottom(a) {
            this._rowMarginBottom = a;
        }
        serialize() {
            let a = ", ";
            let b = "   ";
            let c = new StringBuilder(0);
            c.u("{");
            c.u(b + this.n("badgeMarginLeft") + this.badgeMarginLeft + a);
            c.u(b + this.n("badgeMarginTop") + this.badgeMarginTop + a);
            c.u(b + this.n("badgeMarginRight") + this.badgeMarginRight + a);
            c.u(b + this.n("badgeMarginBottom") + this.badgeMarginBottom + a);
            if (this.badgeBounds == null) {
                c.u(b + this.n("badgeBounds") + "{}" + a);
            }
            else {
                c.u(b + this.n("badgeBounds") + DataLegendVisualData.serialize1(this.badgeBounds) + a);
            }
            c.u(b + this.n("badgeShape") + DataLegendVisualData.serialize1(this.badgeShape) + a);
            c.u(b + this.n("rowBounds") + DataLegendVisualData.serialize1(this.rowBounds) + a);
            c.u(b + this.n("rowMarginLeft") + this.rowMarginLeft + a);
            c.u(b + this.n("rowMarginTop") + this.rowMarginTop + a);
            c.u(b + this.n("rowMarginRight") + this.rowMarginRight + a);
            c.u(b + this.n("rowMarginBottom") + this.rowMarginBottom + a);
            let d = new List$1(String_$type, 0);
            for (let e of fromEnum(this.columns)) {
                d.add(e.serialize());
            }
            c.u(b + this.n("columns") + "[");
            c.u(b + b + stringJoin(", \n" + b + b, ...d.toArray()));
            c.u(b + "]");
            c.u("}");
            return c.toString();
        }
        n(a) {
            return a + ": ";
        }
    }
    DataLegendVisualDataRow.$t = markType(DataLegendVisualDataRow, 'DataLegendVisualDataRow');
    return DataLegendVisualDataRow;
})();
