/*
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 { EventArgs, Base, markType } from "igniteui-react-core/ES2015/type";
import { Rect } from "igniteui-react-core/ES2015/Rect";
export class ZoomSliderWidget extends Base {
    constructor() {
        super();
        this.n = null;
        this.l = null;
        this.b = null;
        this.c = false;
        this.v = Rect.empty;
        this.windowRectChanged = null;
        this.d = false;
    }
    windowRectChangedHandler(a, b) {
        this.w = new Rect(0, (b.newRect.left), (b.newRect.top), (b.newRect.width), (b.newRect.height));
    }
    static a(externalChart_, host_) {
        let result_ = new ZoomSliderWidget();
        let component_ = null;
        let callback_ = (a) => {
            component_ = a;
            result_.n = a;
            result_.c = true;
            component_.i.windowRectChanged = (sender, args) => { result_.windowRectChangedHandler(sender, args); };
            if (!result_.v.isEmpty) {
                let b = result_.v;
                result_.s("windowRect", {
                    left: b.left,
                    top: b.top,
                    width: b.width,
                    height: b.height
                });
            }
            if (result_.b != null) {
                result_.b();
            }
        };
        externalChart_._createZoomSlider(host_.getNativeElement(), callback_);
        result_.l = host_;
        result_.n = component_;
        return result_;
    }
    get e() {
        return this.c;
    }
    get w() {
        return this.v;
    }
    set w(a) {
        let b = this.w;
        if (Rect.l_op_Inequality(a, b)) {
            this.v = a;
            if (this.n != null) {
                this.s("windowRect", {
                    left: a.left,
                    top: a.top,
                    width: a.width,
                    height: a.height
                });
                if (this.windowRectChanged != null) {
                    this.windowRectChanged(this, EventArgs.empty);
                }
            }
        }
    }
    get h() {
        return this.m("startInset");
    }
    set h(a) {
        this.s("startInset", a);
    }
    get g() {
        return this.m("endInset");
    }
    set g(a) {
        this.s("endInset", a);
    }
    get j() {
        return this.m("trackStartInset");
    }
    set j(a) {
        this.s("trackStartInset", a);
    }
    get i() {
        return this.m("trackEndInset");
    }
    set i(a) {
        this.s("trackEndInset", a);
    }
    get f() {
        return this.m("barExtent");
    }
    set f(a) {
        this.s("barExtent", a);
    }
    m(a) {
        return this.n[a];
    }
    s(a, b) {
        this.n[a] = b;
    }
    hide() {
        this.l.hide();
    }
    show() {
        this.l.show();
    }
    r() {
        this.n.i.notifySizeChanged();
    }
    p() {
        if (!this.d) {
            this.d = true;
            this.n.updateStyle();
        }
    }
}
ZoomSliderWidget.$t = markType(ZoomSliderWidget, 'ZoomSliderWidget');
