/*
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, Point_$type, markType } from "igniteui-react-core/ES5/type";
import { ITrackRangeVisual_$type } from "./ITrackRangeVisual";
import { Path } from "igniteui-react-core/ES5/Path";
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 { LineSegment } from "igniteui-react-core/ES5/LineSegment";
import { PolyLineSegment } from "igniteui-react-core/ES5/PolyLineSegment";
/**
 * @hidden
 */
var DefaultTrackRangeVisual = /** @class */ (function (_super) {
    tslib_1.__extends(DefaultTrackRangeVisual, _super);
    function DefaultTrackRangeVisual() {
        var _this = _super.call(this) || this;
        _this._translateX = 0;
        _this._translateY = 0;
        _this.a = 0;
        _this.c = -1;
        _this.b = -1;
        _this._thumbBox = null;
        _this._thumbRidges = null;
        _this._allPaths = null;
        _this.thumbBox = new Path();
        _this.thumbRidges = new Path();
        _this.allPaths = new List$1(Path.$, 0);
        _this.allPaths.add(_this.thumbBox);
        _this.allPaths.add(_this.thumbRidges);
        _this.thumbBox._stroke = _this.getThumbBoxDefaultStroke();
        _this.thumbBox.ac = 1;
        _this.thumbBox._fill = _this.getThumbBoxDefaultBrush();
        _this.thumbRidges._stroke = _this.getThumbRidgesDefaultStroke();
        _this.thumbRidges.ac = 1;
        return _this;
    }
    DefaultTrackRangeVisual.prototype.getThumbBoxDefaultStroke = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    };
    DefaultTrackRangeVisual.prototype.getThumbBoxDefaultStrokeThickness = function () {
        return 1;
    };
    DefaultTrackRangeVisual.prototype.getThumbBoxDefaultBrush = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 249, 249, 249);
            return $ret;
        })());
    };
    DefaultTrackRangeVisual.prototype.getThumbRidgesDefaultStroke = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 119, 119, 119);
            return $ret;
        })());
    };
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "translateX", {
        get: function () {
            return this._translateX;
        },
        set: function (a) {
            this._translateX = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "translateY", {
        get: function () {
            return this._translateY;
        },
        set: function (a) {
            this._translateY = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackRangeVisual.prototype.e = function () {
        if (this.orientation == 0) {
            var a = new PathGeometry();
            var b = new PathFigure();
            var c = new LineSegment(1);
            b._isClosed = false;
            b._isFilled = false;
            b._startPoint = { $type: Point_$type, x: -3, y: (this.height / -2) * 0.5 };
            c.c = { $type: Point_$type, x: -3, y: (this.height / 2) * 0.5 };
            b._segments.add(c);
            a.b.add(b);
            var d = new PathFigure();
            var e = new LineSegment(1);
            d._isClosed = false;
            d._isFilled = false;
            d._startPoint = { $type: Point_$type, x: 0, y: (this.height / -2) * 0.5 };
            e.c = { $type: Point_$type, x: 0, y: (this.height / 2) * 0.5 };
            d._segments.add(e);
            a.b.add(d);
            var f = new PathFigure();
            var g = new LineSegment(1);
            f._isClosed = false;
            f._isFilled = false;
            f._startPoint = { $type: Point_$type, x: 3, y: (this.height / -2) * 0.5 };
            g.c = { $type: Point_$type, x: 3, y: (this.height / 2) * 0.5 };
            f._segments.add(g);
            a.b.add(f);
            this.thumbRidges.aj = a;
        }
        else {
            var h = new PathGeometry();
            var i = new PathFigure();
            var j = new LineSegment(1);
            i._isClosed = false;
            i._isFilled = false;
            i._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: -3 };
            j.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: -3 };
            i._segments.add(j);
            h.b.add(i);
            var k = new PathFigure();
            var l = new LineSegment(1);
            k._isClosed = false;
            k._isFilled = false;
            k._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: 0 };
            l.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: 0 };
            k._segments.add(l);
            h.b.add(k);
            var m = new PathFigure();
            var n = new LineSegment(1);
            m._isClosed = false;
            m._isFilled = false;
            i._startPoint = { $type: Point_$type, x: (this.width / -2) * 0.5, y: 3 };
            j.c = { $type: Point_$type, x: (this.width / 2) * 0.5, y: 3 };
            m._segments.add(n);
            h.b.add(m);
            this.thumbRidges.aj = h;
        }
    };
    DefaultTrackRangeVisual.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: this.width / -2, y: this.height / -2 };
        c._points.add({ $type: Point_$type, x: this.width / 2, y: this.height / -2 });
        c._points.add({ $type: Point_$type, x: this.width / 2, y: this.height / 2 });
        c._points.add({ $type: Point_$type, x: this.width / -2, y: this.height / 2 });
        b._segments.add(c);
        a.b.add(b);
        this.thumbBox.aj = a;
    };
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "orientation", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            var b = this.a;
            this.a = a;
            if (this.a != b) {
                this.f();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.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
    });
    DefaultTrackRangeVisual.prototype.f = function () {
        if (this.width > 0 && this.height > 0) {
            this.d();
            this.e();
        }
    };
    Object.defineProperty(DefaultTrackRangeVisual.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(DefaultTrackRangeVisual.prototype, "thumbBox", {
        get: function () {
            return this._thumbBox;
        },
        set: function (a) {
            this._thumbBox = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "thumbRidges", {
        get: function () {
            return this._thumbRidges;
        },
        set: function (a) {
            this._thumbRidges = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "allPaths", {
        get: function () {
            return this._allPaths;
        },
        set: function (a) {
            this._allPaths = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackRangeVisual.$t = markType(DefaultTrackRangeVisual, 'DefaultTrackRangeVisual', Base.$, [ITrackRangeVisual_$type]);
    return DefaultTrackRangeVisual;
}(Base));
export { DefaultTrackRangeVisual };
