/*
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 { ITrackThumbVisual_$type } from "./ITrackThumbVisual";
import { Path } from "igniteui-react-core/ES2015/Path";
import { Base, Point_$type, markType } from "igniteui-react-core/ES2015/type";
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 { LineSegment } from "igniteui-react-core/ES2015/LineSegment";
import { PolyLineSegment } from "igniteui-react-core/ES2015/PolyLineSegment";
export class DefaultTrackThumbVisual extends Base {
    constructor() {
        super();
        this._translateX = 0;
        this._translateY = 0;
        this.c = -1;
        this.a = 0;
        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.width = this.getTrackThumbDefaultWidth();
        this.height = this.getTrackThumbDefaultHeight();
        this.thumbBox._stroke = this.getThumbBoxDefaultStroke();
        this.thumbBox.ac = this.getThumbBoxDefaultStrokeThickness();
        this.thumbBox._fill = this.getThumbBoxDefaultBrush();
        this.thumbRidges._stroke = this.getThumbRidgesDefaultStroke();
        this.thumbRidges.ac = 1;
    }
    get translateX() {
        return this._translateX;
    }
    set translateX(a) {
        this._translateX = a;
    }
    get translateY() {
        return this._translateY;
    }
    set translateY(a) {
        this._translateY = a;
    }
    getTrackThumbDefaultWidth() {
        return 10;
    }
    getTrackThumbDefaultHeight() {
        return 22;
    }
    getThumbBoxDefaultStroke() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    }
    getThumbBoxDefaultStrokeThickness() {
        return 1;
    }
    getThumbBoxDefaultBrush() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 249, 249, 249);
            return $ret;
        })());
    }
    getThumbRidgesDefaultStroke() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 119, 119, 119);
            return $ret;
        })());
    }
    e() {
        if (this.orientation == 0) {
            let a = new PathGeometry();
            let b = new PathFigure();
            let c = new LineSegment(1);
            b._isClosed = false;
            b._isFilled = false;
            b._startPoint = { $type: Point_$type, x: -1.5, y: -4 };
            c.c = { $type: Point_$type, x: -1.5, y: 4 };
            b._segments.add(c);
            a.b.add(b);
            let d = new PathFigure();
            let e = new LineSegment(1);
            d._isClosed = false;
            d._isFilled = false;
            d._startPoint = { $type: Point_$type, x: 1.5, y: -4 };
            e.c = { $type: Point_$type, x: 1.5, y: 4 };
            d._segments.add(e);
            a.b.add(d);
            this.thumbRidges.aj = a;
        }
        else {
            let f = new PathGeometry();
            let g = new PathFigure();
            let h = new LineSegment(1);
            g._isClosed = false;
            g._isFilled = false;
            g._startPoint = { $type: Point_$type, x: -4, y: -1.5 };
            h.c = { $type: Point_$type, x: 4, y: -1.5 };
            g._segments.add(h);
            f.b.add(g);
            let i = new PathFigure();
            let j = new LineSegment(1);
            i._isClosed = false;
            i._isFilled = false;
            i._startPoint = { $type: Point_$type, x: -4, y: 1.5 };
            j.c = { $type: Point_$type, x: 4, y: 1.5 };
            i._segments.add(j);
            f.b.add(i);
            this.thumbRidges.aj = f;
        }
    }
    d() {
        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.thumbBox.aj = a;
    }
    get width() {
        return this.c;
    }
    set width(a) {
        let b = this.c;
        this.c = a;
        if (b != this.c) {
            this.f();
        }
    }
    f() {
        if (this.width > 0 && this.height > 0) {
            this.d();
            this.e();
        }
    }
    get orientation() {
        return this.a;
    }
    set orientation(a) {
        let b = this.a;
        this.a = a;
        if (this.a != b) {
            this.f();
        }
    }
    get height() {
        return this.b;
    }
    set height(a) {
        let b = this.b;
        this.b = a;
        if (this.b != b) {
            this.f();
        }
    }
    get thumbBox() {
        return this._thumbBox;
    }
    set thumbBox(a) {
        this._thumbBox = a;
    }
    get thumbRidges() {
        return this._thumbRidges;
    }
    set thumbRidges(a) {
        this._thumbRidges = a;
    }
    get allPaths() {
        return this._allPaths;
    }
    set allPaths(a) {
        this._allPaths = a;
    }
}
DefaultTrackThumbVisual.$t = markType(DefaultTrackThumbVisual, 'DefaultTrackThumbVisual', Base.$, [ITrackThumbVisual_$type]);
