/*
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 { ITrackBarVisual_$type } from "./ITrackBarVisual";
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 { PolyLineSegment } from "igniteui-react-core/ES5/PolyLineSegment";
/**
 * @hidden
 */
var DefaultTrackBarVisual = /** @class */ (function (_super) {
    tslib_1.__extends(DefaultTrackBarVisual, _super);
    function DefaultTrackBarVisual() {
        var _this = _super.call(this) || this;
        _this._translateX = 0;
        _this._translateY = 0;
        _this.b = -1;
        _this.a = -1;
        _this._barBox = null;
        _this._allPaths = null;
        _this.barBox = new Path();
        _this.allPaths = new List$1(Path.$, 0);
        _this.allPaths.add(_this.barBox);
        _this.barBox._fill = _this.getBarBoxDefaultBrush();
        return _this;
    }
    Object.defineProperty(DefaultTrackBarVisual.prototype, "translateX", {
        get: function () {
            return this._translateX;
        },
        set: function (a) {
            this._translateX = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackBarVisual.prototype, "translateY", {
        get: function () {
            return this._translateY;
        },
        set: function (a) {
            this._translateY = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackBarVisual.prototype.getBarBoxDefaultBrush = function () {
        return ((function () {
            var $ret = new Brush();
            $ret.color = Color.u(255, 218, 218, 218);
            return $ret;
        })());
    };
    DefaultTrackBarVisual.prototype.getBarBoxDefaultOutline = function () {
        return null;
    };
    DefaultTrackBarVisual.prototype.getBarBoxDefaultStrokeThickness = function () {
        return 0;
    };
    DefaultTrackBarVisual.prototype.c = 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.barBox.aj = a;
    };
    Object.defineProperty(DefaultTrackBarVisual.prototype, "width", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            var b = this.b;
            this.b = a;
            if (b != this.b) {
                this.d();
            }
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackBarVisual.prototype.d = function () {
        if (this.width > 0 && this.height > 0) {
            this.c();
        }
    };
    Object.defineProperty(DefaultTrackBarVisual.prototype, "height", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            var b = this.a;
            this.a = a;
            if (this.a != b) {
                this.d();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackBarVisual.prototype, "barBox", {
        get: function () {
            return this._barBox;
        },
        set: function (a) {
            this._barBox = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DefaultTrackBarVisual.prototype, "allPaths", {
        get: function () {
            return this._allPaths;
        },
        set: function (a) {
            this._allPaths = a;
        },
        enumerable: true,
        configurable: true
    });
    DefaultTrackBarVisual.$t = markType(DefaultTrackBarVisual, 'DefaultTrackBarVisual', Base.$, [ITrackBarVisual_$type]);
    return DefaultTrackBarVisual;
}(Base));
export { DefaultTrackBarVisual };
