/*
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 { StringBuilder } from "igniteui-react-core/ES2015/StringBuilder";
/**
 * @hidden
 */
export class PointerTooltipVisualData extends Base {
    constructor() {
        super(...arguments);
        this._boxShape = null;
        this._pointerFillShape = null;
        this._pointerOutlineShape = null;
        this._offsetX = 0;
        this._offsetY = 0;
        this._categoryNames = null;
        this._viewport = null;
    }
    get boxShape() {
        return this._boxShape;
    }
    set boxShape(a) {
        this._boxShape = a;
    }
    get pointerFillShape() {
        return this._pointerFillShape;
    }
    set pointerFillShape(a) {
        this._pointerFillShape = a;
    }
    get pointerOutlineShape() {
        return this._pointerOutlineShape;
    }
    set pointerOutlineShape(a) {
        this._pointerOutlineShape = a;
    }
    get offsetX() {
        return this._offsetX;
    }
    set offsetX(a) {
        this._offsetX = a;
    }
    get offsetY() {
        return this._offsetY;
    }
    set offsetY(a) {
        this._offsetY = a;
    }
    get categoryNames() {
        return this._categoryNames;
    }
    set categoryNames(a) {
        this._categoryNames = a;
    }
    serialize() {
        let a = "";
        if (this.categoryNames != null) {
            for (let b of fromEnum(this.categoryNames)) {
                a += "\"" + b + "\",";
            }
            if (a != "") {
                a = a.substr(0, a.length - 1);
            }
        }
        let c = new StringBuilder(0);
        c.u("{");
        c.u("offsetX: " + this.offsetX + ", ");
        c.u("offsetY: " + this.offsetY + ", ");
        c.u("boxShape: " + this.boxShape.serialize() + ", ");
        c.u("pointerFillShape: " + this.pointerFillShape.serialize() + ", ");
        c.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}, ");
        c.u("pointerOutlineShape: " + this.pointerOutlineShape.serialize() + ", ");
        c.u("categoryNames: [" + a + "]");
        c.u("}");
        return c.toString();
    }
    scaleByViewport(a) {
        this.boxShape.scaleByViewport(this.viewport);
        this.pointerFillShape.scaleByViewport(this.viewport);
        this.pointerOutlineShape.scaleByViewport(this.viewport);
        this.offsetX = (this.offsetX - a.left) / a.width;
        this.offsetY = (this.offsetY - a.top) / a.height;
    }
    get viewport() {
        return this._viewport;
    }
    set viewport(a) {
        this._viewport = a;
    }
}
PointerTooltipVisualData.$t = markType(PointerTooltipVisualData, 'PointerTooltipVisualData');
