/*
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 { Base, Point_$type, markType } from "igniteui-react-core/ES2015/type";
import { ITrackBarVisual_$type } from "./ITrackBarVisual";
import { Path } from "igniteui-react-core/ES2015/Path";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { Brush } from "igniteui-react-core/ES2015/Brush";
import { Color } from "igniteui-react-core/ES2015/Color";
import { PathGeometry } from "igniteui-react-core/ES2015/PathGeometry";
import { PathFigure } from "igniteui-react-core/ES2015/PathFigure";
import { PolyLineSegment } from "igniteui-react-core/ES2015/PolyLineSegment";
/**
 * @hidden
 */
export class DefaultTrackBarVisual extends Base {
    constructor() {
        super();
        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();
    }
    get translateX() {
        return this._translateX;
    }
    set translateX(a) {
        this._translateX = a;
    }
    get translateY() {
        return this._translateY;
    }
    set translateY(a) {
        this._translateY = a;
    }
    getBarBoxDefaultBrush() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 218, 218, 218);
            return $ret;
        })());
    }
    getBarBoxDefaultOutline() {
        return null;
    }
    getBarBoxDefaultStrokeThickness() {
        return 0;
    }
    c() {
        let a = new PathGeometry();
        let b = new PathFigure();
        let 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;
    }
    get width() {
        return this.b;
    }
    set width(a) {
        let b = this.b;
        this.b = a;
        if (b != this.b) {
            this.d();
        }
    }
    d() {
        if (this.width > 0 && this.height > 0) {
            this.c();
        }
    }
    get height() {
        return this.a;
    }
    set height(a) {
        let b = this.a;
        this.a = a;
        if (this.a != b) {
            this.d();
        }
    }
    get barBox() {
        return this._barBox;
    }
    set barBox(a) {
        this._barBox = a;
    }
    get allPaths() {
        return this._allPaths;
    }
    set allPaths(a) {
        this._allPaths = a;
    }
}
DefaultTrackBarVisual.$t = markType(DefaultTrackBarVisual, 'DefaultTrackBarVisual', Base.$, [ITrackBarVisual_$type]);
