/*
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, fromEnum, markType } from "igniteui-react-core/ES2015/type";
import { PrimitiveVisualDataList } from "igniteui-react-core/ES2015/PrimitiveVisualDataList";
import { PointerTooltipVisualDataList } from "./PointerTooltipVisualDataList";
import { MarkerVisualDataList } from "./MarkerVisualDataList";
import { CalloutVisualDataList } from "./CalloutVisualDataList";
import { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
/**
 * @hidden
 */
export class SeriesVisualData extends Base {
    constructor() {
        super();
        this._name = null;
        this._type = null;
        this._viewport = null;
        this._opacity = 0;
        this._shapes = null;
        this._pointerTooltips = null;
        this._markerShapes = null;
        this._calloutShapes = null;
        this._pixels = null;
        this._pixelWidth = 0;
        this._pixelHeight = 0;
        this.shapes = new PrimitiveVisualDataList();
        this.markerShapes = new MarkerVisualDataList();
        this.pointerTooltips = new PointerTooltipVisualDataList();
        this.calloutShapes = new CalloutVisualDataList();
    }
    get name() {
        return this._name;
    }
    set name(a) {
        this._name = a;
    }
    get type() {
        return this._type;
    }
    set type(a) {
        this._type = a;
    }
    get viewport() {
        return this._viewport;
    }
    set viewport(a) {
        this._viewport = a;
    }
    get opacity() {
        return this._opacity;
    }
    set opacity(a) {
        this._opacity = a;
    }
    get shapes() {
        return this._shapes;
    }
    set shapes(a) {
        this._shapes = a;
    }
    get pointerTooltips() {
        return this._pointerTooltips;
    }
    set pointerTooltips(a) {
        this._pointerTooltips = a;
    }
    get markerShapes() {
        return this._markerShapes;
    }
    set markerShapes(a) {
        this._markerShapes = a;
    }
    get calloutShapes() {
        return this._calloutShapes;
    }
    set calloutShapes(a) {
        this._calloutShapes = a;
    }
    get pixels() {
        return this._pixels;
    }
    set pixels(a) {
        this._pixels = a;
    }
    get pixelWidth() {
        return this._pixelWidth;
    }
    set pixelWidth(a) {
        this._pixelWidth = a;
    }
    get pixelHeight() {
        return this._pixelHeight;
    }
    set pixelHeight(a) {
        this._pixelHeight = a;
    }
    m() {
        for (let a of fromEnum(this.shapes)) {
            a.scaleByViewport(this.viewport);
        }
        for (let b of fromEnum(this.markerShapes)) {
            b.i(this.viewport);
        }
        for (let c of fromEnum(this.pointerTooltips)) {
            c.scaleByViewport(this.viewport);
        }
    }
    serialize() {
        let a = new StringBuilder(0);
        a.u("{");
        a.u("name: \"" + this.name + "\",");
        a.u("type: \"" + this.type + "\", ");
        a.u("opacity: " + this.opacity + ", ");
        a.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}, ");
        a.u("shapes: [");
        for (let b = 0; b < this.shapes.count; b++) {
            if (b != 0) {
                a.l(", ");
            }
            a.l(this.shapes._inner[b].serialize());
        }
        a.u("],");
        a.u("pointerTooltips: [");
        for (let c = 0; c < this.pointerTooltips.count; c++) {
            if (c != 0) {
                a.l(", ");
            }
            a.l(this.pointerTooltips._inner[c].serialize());
        }
        a.u("],");
        if (this.calloutShapes != null && this.calloutShapes.count > 0) {
            a.u("calloutshapes: [");
            for (let d = 0; d < this.calloutShapes.count; d++) {
                if (d != 0) {
                    a.l(", ");
                }
                a.l(this.calloutShapes._inner[d].serialize());
            }
            a.u("],");
        }
        a.u("markerShapes: [");
        for (let e = 0; e < this.markerShapes.count; e++) {
            if (e != 0) {
                a.l(", ");
            }
            a.l(this.markerShapes._inner[e].serialize());
        }
        a.u("]");
        if (this.pixels != null) {
            a.u(", pixels: [");
            for (let f = 0; f < this.pixels.length; f++) {
                if (f != 0) {
                    a.l(", ");
                }
                a.l(this.pixels[f].toString());
            }
            a.u("], ");
            a.u("pixelWidth: " + this.pixelWidth + ", ");
        }
        a.u("}");
        return a.toString();
    }
}
SeriesVisualData.$t = markType(SeriesVisualData, 'SeriesVisualData');
