/*
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 { ITrackThumbCalloutVisual_$type } from "./ITrackThumbCalloutVisual";
import { Path } from "igniteui-react-core/ES2015/Path";
import { TextBlock } from "igniteui-react-core/ES2015/TextBlock";
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 { PolyLineSegment } from "igniteui-react-core/ES2015/PolyLineSegment";
export class DefaultTrackThumbCalloutVisual extends Base {
    constructor() {
        super();
        this._translateX = 0;
        this._translateY = 0;
        this._textTranslateX = 0;
        this._textTranslateY = 0;
        this.c = -1;
        this.b = -1;
        this.a = false;
        this._calloutBox = null;
        this._calloutText = null;
        this._allPaths = null;
        this.calloutBox = new Path();
        this.calloutBox._visibility = 1;
        this.calloutText = new TextBlock();
        this.calloutText._visibility = 1;
        this.allPaths = new List$1(Path.$, 0);
        this.allPaths.add(this.calloutBox);
        this.height = 22;
        this.width = 10;
        this.calloutBox._stroke = this.getCalloutBoxDefaultStroke();
        this.calloutBox.ac = this.getCalloutBoxDefaultStrokeThickness();
        this.calloutBox._fill = this.getCalloutBoxDefaultBrush();
        this.calloutText.am = this.getCalloutTextDefaultBrush();
        this.calloutText.ak = "";
    }
    get translateX() {
        return this._translateX;
    }
    set translateX(a) {
        this._translateX = a;
    }
    get translateY() {
        return this._translateY;
    }
    set translateY(a) {
        this._translateY = a;
    }
    get textTranslateX() {
        return this._textTranslateX;
    }
    set textTranslateX(a) {
        this._textTranslateX = a;
    }
    get textTranslateY() {
        return this._textTranslateY;
    }
    set textTranslateY(a) {
        this._textTranslateY = a;
    }
    getCalloutBoxDefaultStroke() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    }
    getCalloutBoxDefaultStrokeThickness() {
        return 1;
    }
    getCalloutBoxDefaultBrush() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(200, 255, 255, 255);
            return $ret;
        })());
    }
    getCalloutTextDefaultBrush() {
        return ((() => {
            let $ret = new Brush();
            $ret.color = Color.u(255, 185, 185, 185);
            return $ret;
        })());
    }
    e() {
    }
    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: 0, y: 0 };
        c._points.add({ $type: Point_$type, x: this.width, y: 0 });
        c._points.add({ $type: Point_$type, x: this.width, y: this.height });
        c._points.add({ $type: Point_$type, x: 0, y: this.height });
        b._segments.add(c);
        a.b.add(b);
        this.calloutBox.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.e();
            this.d();
        }
    }
    get height() {
        return this.b;
    }
    set height(a) {
        let b = this.b;
        this.b = a;
        if (this.b != b) {
            this.f();
        }
    }
    get isVisible() {
        return this.a;
    }
    set isVisible(a) {
        let b = this.a;
        this.a = a;
        if (this.a != b) {
            this.calloutBox._visibility = this.a ? 0 : 1;
            this.calloutText._visibility = this.a ? 0 : 1;
        }
    }
    get calloutBox() {
        return this._calloutBox;
    }
    set calloutBox(a) {
        this._calloutBox = a;
    }
    get calloutText() {
        return this._calloutText;
    }
    set calloutText(a) {
        this._calloutText = a;
    }
    get allPaths() {
        return this._allPaths;
    }
    set allPaths(a) {
        this._allPaths = a;
    }
}
DefaultTrackThumbCalloutVisual.$t = markType(DefaultTrackThumbCalloutVisual, 'DefaultTrackThumbCalloutVisual', Base.$, [ITrackThumbCalloutVisual_$type]);
