/*
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 { __extends } from "tslib";
import { Base, Point_$type, markType } from "igniteui-angular-core";
import { ITrackRangeVisual_$type } from "./ITrackRangeVisual";
import { Path } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { LineSegment } from "igniteui-angular-core";
import { PolyLineSegment } from "igniteui-angular-core";
/**
 * @hidden
 */
var DefaultTrackRangeVisual = /** @class */ /*@__PURE__*/ (function (_super) {
    __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: false,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "translateY", {
        get: function () {
            return this._translateY;
        },
        set: function (a) {
            this._translateY = a;
        },
        enumerable: false,
        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.c.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.c.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.c.add(f);
            this.thumbRidges.ak = 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.c.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.c.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.c.add(m);
            this.thumbRidges.ak = 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.c.add(b);
        this.thumbBox.ak = 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: false,
        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: false,
        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: false,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "thumbBox", {
        get: function () {
            return this._thumbBox;
        },
        set: function (a) {
            this._thumbBox = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "thumbRidges", {
        get: function () {
            return this._thumbRidges;
        },
        set: function (a) {
            this._thumbRidges = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DefaultTrackRangeVisual.prototype, "allPaths", {
        get: function () {
            return this._allPaths;
        },
        set: function (a) {
            this._allPaths = a;
        },
        enumerable: false,
        configurable: true
    });
    DefaultTrackRangeVisual.$t = markType(DefaultTrackRangeVisual, 'DefaultTrackRangeVisual', Base.$, [ITrackRangeVisual_$type]);
    return DefaultTrackRangeVisual;
}(Base));
export { DefaultTrackRangeVisual };
