/*
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 } from "igniteui-react-core/ES2015/type";
import { PointData } from "igniteui-react-core/ES2015/PointData";
import { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
import { isNaN_ } from "igniteui-react-core/ES2015/number";
/**
 * @hidden
 */
export class SliceVisualData extends Base {
    constructor() {
        super(...arguments);
        this._pieSlice = null;
        this._outline = null;
        this._labelVisualData = null;
        this._backgroundPath = null;
        this._origin = null;
        this._explodedOrigin = null;
        this._isExploded = false;
        this._isSelected = false;
        this._index = 0;
        this._radius = 0;
        this._startAngle = 0;
        this._endAngle = 0;
        this._visibility = false;
    }
    get pieSlice() {
        return this._pieSlice;
    }
    set pieSlice(a) {
        this._pieSlice = a;
    }
    get outline() {
        return this._outline;
    }
    set outline(a) {
        this._outline = a;
    }
    get labelVisualData() {
        return this._labelVisualData;
    }
    set labelVisualData(a) {
        this._labelVisualData = a;
    }
    get backgroundPath() {
        return this._backgroundPath;
    }
    set backgroundPath(a) {
        this._backgroundPath = a;
    }
    get origin() {
        return this._origin;
    }
    set origin(a) {
        this._origin = a;
    }
    get explodedOrigin() {
        return this._explodedOrigin;
    }
    set explodedOrigin(a) {
        this._explodedOrigin = a;
    }
    get isExploded() {
        return this._isExploded;
    }
    set isExploded(a) {
        this._isExploded = a;
    }
    get isSelected() {
        return this._isSelected;
    }
    set isSelected(a) {
        this._isSelected = a;
    }
    get index() {
        return this._index;
    }
    set index(a) {
        this._index = a;
    }
    get radius() {
        return this._radius;
    }
    set radius(a) {
        this._radius = a;
    }
    get startAngle() {
        return this._startAngle;
    }
    set startAngle(a) {
        this._startAngle = a;
    }
    get endAngle() {
        return this._endAngle;
    }
    set endAngle(a) {
        this._endAngle = a;
    }
    get visibility() {
        return this._visibility;
    }
    set visibility(a) {
        this._visibility = a;
    }
    scaleByViewport(a) {
        this.origin = new PointData((this.origin.x - a.left) / a.width, (this.origin.y - a.top) / a.height);
        this.explodedOrigin = new PointData((this.explodedOrigin.x - a.left) / a.width, (this.explodedOrigin.y - a.top) / a.height);
    }
    serialize() {
        let a = new StringBuilder(0);
        let b = true;
        a.u("{");
        if (this.pieSlice != null) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("pieSlice: ");
            a.u(this.pieSlice.serialize());
        }
        if (this.labelVisualData != null) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("labelVisualData: ");
            a.u(this.labelVisualData.serialize());
        }
        if (this.backgroundPath != null) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("backgroundPath: ");
            a.u(this.backgroundPath.serialize());
        }
        if (b) {
            b = false;
        }
        else {
            a.l(", ");
        }
        a.l("isExploded: ");
        a.u(this.isExploded.toString().toLowerCase());
        if (b) {
            b = false;
        }
        else {
            a.l(", ");
        }
        a.l("isSelected: ");
        a.u(this.isSelected.toString().toLowerCase());
        if (!isNaN_(this.explodedOrigin.x) && !isNaN_(this.explodedOrigin.y)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("explodedOrigin: ");
            a.u("{ x: " + this.explodedOrigin.x.toString() + ", y: " + this.explodedOrigin.y.toString() + "}");
        }
        if (!isNaN_(this.origin.x) && !isNaN_(this.origin.y)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("origin: ");
            a.u("{ x: " + this.origin.x.toString() + ", y: " + this.origin.y.toString() + "}");
        }
        if (!isNaN_(this.index)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("index: ");
            a.u(this.index.toString());
        }
        if (!isNaN_(this.radius)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("radius: ");
            a.u(this.radius.toString());
        }
        a.l(", visibility: ");
        a.u(this.visibility ? "true" : "false");
        if (!isNaN_(this.startAngle)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("startAngle: ");
            a.u(this.startAngle.toString());
        }
        if (!isNaN_(this.endAngle)) {
            if (b) {
                b = false;
            }
            else {
                a.l(", ");
            }
            a.l("endAngle: ");
            a.u(this.endAngle.toString());
        }
        a.u("}");
        return a.toString();
    }
}
SliceVisualData.$t = markType(SliceVisualData, 'SliceVisualData');
