/*
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 { ITrackThumbCalloutVisual_$type } from "./ITrackThumbCalloutVisual";
import { Path } from "igniteui-react-core/ES5/Path";
import { TextBlock } from "igniteui-react-core/ES5/TextBlock";
import { Base, Point_$type, markType } from "igniteui-react-core/ES5/type";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { Brush } from "igniteui-react-core/ES5/Brush";
import { Color } from "igniteui-react-core/ES5/Color";
import { PathGeometry } from "igniteui-react-core/ES5/PathGeometry";
import { PathFigure } from "igniteui-react-core/ES5/PathFigure";
import { PolyLineSegment } from "igniteui-react-core/ES5/PolyLineSegment";
var DefaultTrackThumbCalloutVisual = /** @class */ (function (_super) {
    tslib_1.__extends(DefaultTrackThumbCalloutVisual, _super);
    function DefaultTrackThumbCalloutVisual() {
        var _this = _super.call(this) || this;
        _this._translateX = 0;
        _this._translateY = 0;
        _this._textTranslateX = 0;
        _this._textTranslateY = 0;
        _this.c = -1;
        _this.b = -1;
        _this.a = false;
        _this._calloutBox = null;
        _this._calloutText = null;
        _this._allPaths = null;
        _this.calloutBox = new Path();
        _this.calloutBox._visibility = 1;
        _this.calloutText = new TextBlock();
        _this.calloutText._visibility = 1;
        _this.allPaths = new List$1(Path.$, 0);
        _this.allPaths.add(_this.calloutBox);
        _this.height = 22;
        _this.width = 10;
        _this.calloutBox._stroke = _this.getCalloutBoxDefaultStroke();
        _this.calloutBox.ac = _this.getCalloutBoxDefaultStrokeThickness();
        _this.calloutBox._fill = _this.getCalloutBoxDefaultBrush();
        _this.calloutText.am = _this.getCalloutTextDefaultBrush();
        _this.calloutText.ak = "";
        return _this;
    }
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "translateX", {
        get: function () {
            return this._translateX;
        },
        set: function (a) {
            this._translateX = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "translateY", {
        get: function () {
            return this._translateY;
        },
        set: function (a) {
            this._translateY = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "textTranslateX", {
        get: function () {
            return this._textTranslateX;
        },
        set: function (a) {
            this._textTranslateX = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "textTranslateY", {
        get: function () {
            return this._textTranslateY;
        },
        set: function (a) {
            this._textTranslateY = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultStroke = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    };
    DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultStrokeThickness = function () {
        return 1;
    };
    DefaultTrackThumbCalloutVisual.prototype.getCalloutBoxDefaultBrush = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(200, 255, 255, 255);
            return $ret;
        })());
    };
    DefaultTrackThumbCalloutVisual.prototype.getCalloutTextDefaultBrush = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    };
    DefaultTrackThumbCalloutVisual.prototype.e = function () {
    };
    DefaultTrackThumbCalloutVisual.prototype.d = function () {
        var a = new PathGeometry();
        var b = new PathFigure();
        var c = new PolyLineSegment();
        b._isClosed = true;
        b._isFilled = true;
        b._startPoint = { $type: Point_$type, x: 0, y: 0 };
        c._points.add({ $type: Point_$type, x: this.width, y: 0 });
        c._points.add({ $type: Point_$type, x: this.width, y: this.height });
        c._points.add({ $type: Point_$type, x: 0, y: this.height });
        b._segments.add(c);
        a.b.add(b);
        this.calloutBox.aj = a;
    };
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "width", {
        get: function () {
            return this.c;
        },
        set: function (a) {
            var b = this.c;
            this.c = a;
            if (b != this.c) {
                this.f();
            }
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackThumbCalloutVisual.prototype.f = function () {
        if (this.width > 0 && this.height > 0) {
            this.e();
            this.d();
        }
    };
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "height", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            var b = this.b;
            this.b = a;
            if (this.b != b) {
                this.f();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "isVisible", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            var b = this.a;
            this.a = a;
            if (this.a != b) {
                this.calloutBox._visibility = this.a ? 0 : 1;
                this.calloutText._visibility = this.a ? 0 : 1;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "calloutBox", {
        get: function () {
            return this._calloutBox;
        },
        set: function (a) {
            this._calloutBox = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "calloutText", {
        get: function () {
            return this._calloutText;
        },
        set: function (a) {
            this._calloutText = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackThumbCalloutVisual.prototype, "allPaths", {
        get: function () {
            return this._allPaths;
        },
        set: function (a) {
            this._allPaths = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackThumbCalloutVisual.$t = markType(DefaultTrackThumbCalloutVisual, 'DefaultTrackThumbCalloutVisual', Base.$, [ITrackThumbCalloutVisual_$type]);
    return DefaultTrackThumbCalloutVisual;
}(Base));
export { DefaultTrackThumbCalloutVisual };
