import * as tslib_1 from "tslib";
import * as React from 'react';
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES5/type";
import { ZoomSliderOrientation_$type } from "./ZoomSliderOrientation";
import { ZoomSliderResolvingAxisValueEventArgs } from "./igr-zoom-slider-resolving-axis-value-event-args";
import { RectChangedEventArgs } from "igniteui-react-core/ES5/igr-rect-changed-event-args";
import { ZoomSlider } from "./ZoomSlider";
import { getModifiedProps, isValidProp, fromRect, toRect, ensureEnum, brushToString, stringToBrush, ensureBool } from "igniteui-react-core/ES5/componentUtil";
import { FontInfo } from "igniteui-react-core/ES5/FontInfo";
var IgrZoomSlider = /** @class */ (function (_super) {
    tslib_1.__extends(IgrZoomSlider, _super);
    function IgrZoomSlider(props) {
        var _this = _super.call(this, props) || this;
        _this._resolvingAxisValue = null;
        _this._resolvingAxisValue_wrapped = null;
        _this._windowRectChanged = null;
        _this._windowRectChanged_wrapped = null;
        _this._implementation = _this.createImplementation();
        _this._implementation.externalObject = _this;
        _this.onImplementationCreated();
        return _this;
    }
    IgrZoomSlider.prototype.createImplementation = function () {
        return new ZoomSlider();
    };
    Object.defineProperty(IgrZoomSlider.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgrZoomSlider.prototype.onImplementationCreated = function () {
    };
    IgrZoomSlider.prototype.componentDidMount = function () {
        try {
            for (var _a = tslib_1.__values(Object.keys(this.props)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var p = _b.value;
                if (isValidProp(this, p)) {
                    this[p] = this.props[p];
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
            }
            finally { if (e_1) throw e_1.error; }
        }
        var e_1, _c;
    };
    IgrZoomSlider.prototype.shouldComponentUpdate = function (nextProps, nextState) {
        var mod = getModifiedProps(this.props, nextProps);
        try {
            for (var _a = tslib_1.__values(Object.keys(mod)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var p = _b.value;
                if (isValidProp(this, p)) {
                    this[p] = mod[p];
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
            }
            finally { if (e_2) throw e_2.error; }
        }
        return true;
        var e_2, _c;
    };
    IgrZoomSlider.prototype.render = function () {
        return null;
    };
    Object.defineProperty(IgrZoomSlider.prototype, "panTransitionDuration", {
        get: function () {
            return this.i.br;
        },
        set: function (v) {
            this.i.br = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "maxZoomWidth", {
        get: function () {
            return this.i.bj;
        },
        set: function (v) {
            this.i.bj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "pixelScalingRatio", {
        get: function () {
            return this.i.bl;
        },
        set: function (v) {
            this.i.bl = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "actualPixelScalingRatio", {
        get: function () {
            return this.i.a5;
        },
        set: function (v) {
            this.i.a5 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "windowRect", {
        get: function () {
            return fromRect(this.i.fs);
        },
        set: function (v) {
            this.i.fs = toRect(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "minZoomWidth", {
        get: function () {
            return this.i.bk;
        },
        set: function (v) {
            this.i.bk = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "startInset", {
        get: function () {
            return this.i.bn;
        },
        set: function (v) {
            this.i.bn = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "endInset", {
        get: function () {
            return this.i.a8;
        },
        set: function (v) {
            this.i.a8 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "trackStartInset", {
        get: function () {
            return this.i.bp;
        },
        set: function (v) {
            this.i.bp = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "trackEndInset", {
        get: function () {
            return this.i.bo;
        },
        set: function (v) {
            this.i.bo = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "barExtent", {
        get: function () {
            return this.i.a6;
        },
        set: function (v) {
            this.i.a6 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "orientation", {
        get: function () {
            return this.i.e;
        },
        set: function (v) {
            this.i.e = ensureEnum(ZoomSliderOrientation_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbBrush", {
        get: function () {
            return brushToString(this.i.fg);
        },
        set: function (v) {
            this.i.fg = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbStrokeThickness", {
        get: function () {
            return this.i.bh;
        },
        set: function (v) {
            this.i.bh = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbStrokeThickness", {
        get: function () {
            return this.i.bc;
        },
        set: function (v) {
            this.i.bc = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbBrush", {
        get: function () {
            return brushToString(this.i.e8);
        },
        set: function (v) {
            this.i.e8 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbOutline", {
        get: function () {
            return brushToString(this.i.fh);
        },
        set: function (v) {
            this.i.fh = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbOutline", {
        get: function () {
            return brushToString(this.i.e9);
        },
        set: function (v) {
            this.i.e9 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbRidgesBrush", {
        get: function () {
            return brushToString(this.i.fi);
        },
        set: function (v) {
            this.i.fi = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbRidgesBrush", {
        get: function () {
            return brushToString(this.i.fa);
        },
        set: function (v) {
            this.i.fa = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbWidth", {
        get: function () {
            return this.i.bi;
        },
        set: function (v) {
            this.i.bi = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbWidth", {
        get: function () {
            return this.i.bd;
        },
        set: function (v) {
            this.i.bd = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerThumbHeight", {
        get: function () {
            return this.i.bg;
        },
        set: function (v) {
            this.i.bg = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherThumbHeight", {
        get: function () {
            return this.i.bb;
        },
        set: function (v) {
            this.i.bb = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerShadeBrush", {
        get: function () {
            return brushToString(this.i.fe);
        },
        set: function (v) {
            this.i.fe = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerShadeOutline", {
        get: function () {
            return brushToString(this.i.ff);
        },
        set: function (v) {
            this.i.ff = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerShadeStrokeThickness", {
        get: function () {
            return this.i.bf;
        },
        set: function (v) {
            this.i.bf = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherShadeBrush", {
        get: function () {
            return brushToString(this.i.e6);
        },
        set: function (v) {
            this.i.e6 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherShadeOutline", {
        get: function () {
            return brushToString(this.i.e7);
        },
        set: function (v) {
            this.i.e7 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherShadeStrokeThickness", {
        get: function () {
            return this.i.ba;
        },
        set: function (v) {
            this.i.ba = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "barBrush", {
        get: function () {
            return brushToString(this.i.e1);
        },
        set: function (v) {
            this.i.e1 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "barOutline", {
        get: function () {
            return brushToString(this.i.e2);
        },
        set: function (v) {
            this.i.e2 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "barStrokeThickness", {
        get: function () {
            return this.i.a7;
        },
        set: function (v) {
            this.i.a7 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "rangeThumbBrush", {
        get: function () {
            return brushToString(this.i.fj);
        },
        set: function (v) {
            this.i.fj = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "rangeThumbOutline", {
        get: function () {
            return brushToString(this.i.fk);
        },
        set: function (v) {
            this.i.fk = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "rangeThumbStrokeThickness", {
        get: function () {
            return this.i.bm;
        },
        set: function (v) {
            this.i.bm = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "rangeThumbRidgesBrush", {
        get: function () {
            return brushToString(this.i.fl);
        },
        set: function (v) {
            this.i.fl = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerCalloutBrush", {
        get: function () {
            return brushToString(this.i.fb);
        },
        set: function (v) {
            this.i.fb = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerCalloutTextColor", {
        get: function () {
            return brushToString(this.i.fd);
        },
        set: function (v) {
            this.i.fd = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerCalloutOutline", {
        get: function () {
            return brushToString(this.i.fc);
        },
        set: function (v) {
            this.i.fc = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "lowerCalloutStrokeThickness", {
        get: function () {
            return this.i.be;
        },
        set: function (v) {
            this.i.be = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherCalloutBrush", {
        get: function () {
            return brushToString(this.i.e3);
        },
        set: function (v) {
            this.i.e3 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherCalloutTextColor", {
        get: function () {
            return brushToString(this.i.e5);
        },
        set: function (v) {
            this.i.e5 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherCalloutOutline", {
        get: function () {
            return brushToString(this.i.e4);
        },
        set: function (v) {
            this.i.e4 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "higherCalloutStrokeThickness", {
        get: function () {
            return this.i.a9;
        },
        set: function (v) {
            this.i.a9 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "isCustomThumbProvided", {
        get: function () {
            return this.i.ac;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "isCustomRangeThumbProvided", {
        get: function () {
            return this.i.aa;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "isCustomBarProvided", {
        get: function () {
            return this.i.z;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "isCustomShadeProvided", {
        get: function () {
            return this.i.ab;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "areThumbCalloutsEnabled", {
        get: function () {
            return this.i.r;
        },
        set: function (v) {
            this.i.r = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "ThumbCalloutTextStyle", {
        get: function () {
            if (this.i.o == null) {
                return null;
            }
            return this.i.o.fontString;
        },
        set: function (v) {
            var fi = new FontInfo();
            fi.fontString = v;
            this.i.o = fi;
        },
        enumerable: true,
        configurable: true
    });
    IgrZoomSlider.prototype.destroy = function () {
        this.i.destroy();
    };
    IgrZoomSlider.prototype.provideContainer = function (container) {
        this.i.provideContainer(container);
    };
    IgrZoomSlider.prototype.flush = function () {
        this.i.c9();
    };
    IgrZoomSlider.prototype.trackDirty = function () {
        this.i.trackDirty();
    };
    Object.defineProperty(IgrZoomSlider.prototype, "resolvingAxisValue", {
        get: function () {
            return this._resolvingAxisValue;
        },
        set: function (ev) {
            var _this = this;
            if (this._resolvingAxisValue !== null) {
                this.i.resolvingAxisValue = delegateRemove(this.i.resolvingAxisValue, this._resolvingAxisValue_wrapped);
                this._resolvingAxisValue_wrapped = null;
                this._resolvingAxisValue = null;
            }
            this._resolvingAxisValue = ev;
            this._resolvingAxisValue_wrapped = function (o, e) {
                var outerArgs = new ZoomSliderResolvingAxisValueEventArgs();
                outerArgs._provideImplementation(e);
                _this._resolvingAxisValue(_this, outerArgs);
            };
            this.i.resolvingAxisValue = delegateCombine(this.i.resolvingAxisValue, this._resolvingAxisValue_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrZoomSlider.prototype, "windowRectChanged", {
        get: function () {
            return this._windowRectChanged;
        },
        set: function (ev) {
            var _this = this;
            if (this._windowRectChanged !== null) {
                this.i.windowRectChanged = delegateRemove(this.i.windowRectChanged, this._windowRectChanged_wrapped);
                this._windowRectChanged_wrapped = null;
                this._windowRectChanged = null;
            }
            this._windowRectChanged = ev;
            this._windowRectChanged_wrapped = function (o, e) {
                var outerArgs = new RectChangedEventArgs();
                outerArgs._provideImplementation(e);
                _this._windowRectChanged(_this, outerArgs);
            };
            this.i.windowRectChanged = delegateCombine(this.i.windowRectChanged, this._windowRectChanged_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrZoomSlider;
}(React.Component));
export { IgrZoomSlider };
