/*
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 * as tslib_1 from "tslib";
import { Base, fromEnum, markType } from "igniteui-react-core/ES5/type";
import { StringBuilder } from "igniteui-react-core/ES5/StringBuilder";
/**
 * @hidden
 */
var PointerTooltipVisualData = /** @class */ (function (_super) {
    tslib_1.__extends(PointerTooltipVisualData, _super);
    function PointerTooltipVisualData() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._boxShape = null;
        _this._pointerFillShape = null;
        _this._pointerOutlineShape = null;
        _this._offsetX = 0;
        _this._offsetY = 0;
        _this._categoryNames = null;
        _this._viewport = null;
        return _this;
    }
    Object.defineProperty(PointerTooltipVisualData.prototype, "boxShape", {
        get: function () {
            return this._boxShape;
        },
        set: function (a) {
            this._boxShape = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PointerTooltipVisualData.prototype, "pointerFillShape", {
        get: function () {
            return this._pointerFillShape;
        },
        set: function (a) {
            this._pointerFillShape = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PointerTooltipVisualData.prototype, "pointerOutlineShape", {
        get: function () {
            return this._pointerOutlineShape;
        },
        set: function (a) {
            this._pointerOutlineShape = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PointerTooltipVisualData.prototype, "offsetX", {
        get: function () {
            return this._offsetX;
        },
        set: function (a) {
            this._offsetX = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PointerTooltipVisualData.prototype, "offsetY", {
        get: function () {
            return this._offsetY;
        },
        set: function (a) {
            this._offsetY = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PointerTooltipVisualData.prototype, "categoryNames", {
        get: function () {
            return this._categoryNames;
        },
        set: function (a) {
            this._categoryNames = a;
        },
        enumerable: true,
        configurable: true
    });
    PointerTooltipVisualData.prototype.serialize = function () {
        var e_1, _a;
        var a = "";
        if (this.categoryNames != null) {
            try {
                for (var _b = tslib_1.__values(fromEnum(this.categoryNames)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var b = _c.value;
                    a += "\"" + b + "\",";
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                }
                finally { if (e_1) throw e_1.error; }
            }
            if (a != "") {
                a = a.substr(0, a.length - 1);
            }
        }
        var 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();
    };
    PointerTooltipVisualData.prototype.scaleByViewport = function (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;
    };
    Object.defineProperty(PointerTooltipVisualData.prototype, "viewport", {
        get: function () {
            return this._viewport;
        },
        set: function (a) {
            this._viewport = a;
        },
        enumerable: true,
        configurable: true
    });
    PointerTooltipVisualData.$t = markType(PointerTooltipVisualData, 'PointerTooltipVisualData');
    return PointerTooltipVisualData;
}(Base));
export { PointerTooltipVisualData };
