/*
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 { EventArgs, Base, markType } from "igniteui-react-core/ES5/type";
import { Rect } from "igniteui-react-core/ES5/Rect";
var ZoomSliderWidget = /** @class */ (function (_super) {
    tslib_1.__extends(ZoomSliderWidget, _super);
    function ZoomSliderWidget() {
        var _this = _super.call(this) || this;
        _this.n = null;
        _this.l = null;
        _this.b = null;
        _this.c = false;
        _this.v = Rect.empty;
        _this.windowRectChanged = null;
        _this.d = false;
        return _this;
    }
    ZoomSliderWidget.prototype.windowRectChangedHandler = function (a, b) {
        this.w = new Rect(0, (b.newRect.left), (b.newRect.top), (b.newRect.width), (b.newRect.height));
    };
    ZoomSliderWidget.a = function (externalChart_, host_) {
        var result_ = new ZoomSliderWidget();
        var component_ = null;
        var callback_ = function (a) {
            component_ = a;
            result_.n = a;
            result_.c = true;
            component_.i.windowRectChanged = function (sender, args) { result_.windowRectChangedHandler(sender, args); };
            if (!result_.v.isEmpty) {
                var 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_;
    };
    Object.defineProperty(ZoomSliderWidget.prototype, "e", {
        get: function () {
            return this.c;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "w", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            var 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);
                    }
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "h", {
        get: function () {
            return this.m("startInset");
        },
        set: function (a) {
            this.s("startInset", a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "g", {
        get: function () {
            return this.m("endInset");
        },
        set: function (a) {
            this.s("endInset", a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "j", {
        get: function () {
            return this.m("trackStartInset");
        },
        set: function (a) {
            this.s("trackStartInset", a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "i", {
        get: function () {
            return this.m("trackEndInset");
        },
        set: function (a) {
            this.s("trackEndInset", a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ZoomSliderWidget.prototype, "f", {
        get: function () {
            return this.m("barExtent");
        },
        set: function (a) {
            this.s("barExtent", a);
        },
        enumerable: true,
        configurable: true
    });
    ZoomSliderWidget.prototype.m = function (a) {
        return this.n[a];
    };
    ZoomSliderWidget.prototype.s = function (a, b) {
        this.n[a] = b;
    };
    ZoomSliderWidget.prototype.hide = function () {
        this.l.hide();
    };
    ZoomSliderWidget.prototype.show = function () {
        this.l.show();
    };
    ZoomSliderWidget.prototype.r = function () {
        this.n.i.notifySizeChanged();
    };
    ZoomSliderWidget.prototype.p = function () {
        if (!this.d) {
            this.d = true;
            this.n.updateStyle();
        }
    };
    ZoomSliderWidget.$t = markType(ZoomSliderWidget, 'ZoomSliderWidget');
    return ZoomSliderWidget;
}(Base));
export { ZoomSliderWidget };
