/*
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 { Frame } from "./Frame";
import { Dictionary$2 } from "igniteui-react-core/ES5/Dictionary$2";
import { ItemHighlightFrameRect } from "./ItemHighlightFrameRect";
import { DictInterpolator$3 } from "./DictInterpolator$3";
import { BrushUtil } from "igniteui-react-core/ES5/BrushUtil";
import { Number_$type, runOn, markType } from "igniteui-react-core/ES5/type";
import { isNaN_ } from "igniteui-react-core/ES5/number";
var CategoryItemHighlightLayerFrame = /** @class */ (function (_super) {
    tslib_1.__extends(CategoryItemHighlightLayerFrame, _super);
    function CategoryItemHighlightLayerFrame() {
        var _this = _super.call(this) || this;
        _this.g = null;
        _this.f = null;
        _this.g = new Dictionary$2(Number_$type, ItemHighlightFrameRect.$, 0);
        _this.f = new DictInterpolator$3(Number_$type, ItemHighlightFrameRect.$, CategoryItemHighlightLayerFrame.$, runOn(_this, _this.h), function (a) { return a.f; }, function (a) { return true; }, function () { return new ItemHighlightFrameRect(); });
        return _this;
    }
    CategoryItemHighlightLayerFrame.prototype.h = function (a, b, c, d, e, f) {
        if (d != null) {
            a.f = d.f;
        }
        else if (c != null) {
            a.f = c.f;
        }
        else {
            a.f = 0;
        }
        if (c == null || isNaN_(c.e)) {
            a.e = d != null ? d.e : NaN;
        }
        else if (d == null || isNaN_(d.e)) {
            a.e = NaN;
        }
        else {
            a.e = c.e + b * (d.e - c.e);
        }
        if (c == null || isNaN_(c.b)) {
            a.b = d != null ? d.b : NaN;
        }
        else if (d == null || isNaN_(d.b)) {
            a.b = NaN;
        }
        else {
            a.b = c.b + b * (d.b - c.b);
        }
        if (c == null || isNaN_(c.c)) {
            a.c = d != null ? d.c : NaN;
        }
        else if (d == null || isNaN_(d.c)) {
            a.c = NaN;
        }
        else {
            a.c = c.c + b * (d.c - c.c);
        }
        if (c == null || isNaN_(c.a)) {
            a.a = d != null ? d.a : NaN;
        }
        else if (d == null || isNaN_(d.a)) {
            a.a = NaN;
        }
        else {
            a.a = c.a + b * (d.a - c.a);
        }
        if (c == null || isNaN_(c.d)) {
            a.d = d != null ? d.d : NaN;
        }
        else if (d == null || isNaN_(d.d)) {
            a.d = NaN;
        }
        else {
            a.d = c.d + b * (d.d - c.d);
        }
        if (c == null || c.i == null) {
            a.i = d != null ? d.i : null;
        }
        else if (d == null || d.i == null) {
            a.i = null;
        }
        else {
            a.i = BrushUtil.g(c.i, b, d.i, 0);
        }
        if (c == null || c.j == null) {
            a.j = d != null ? d.j : null;
        }
        else if (d == null || d.j == null) {
            a.j = null;
        }
        else {
            a.j = BrushUtil.g(c.j, b, d.j, 0);
        }
        if (c == null || c.h == null) {
            a.h = d != null ? d.h : null;
        }
        else if (d == null || d.j == null) {
            a.h = null;
        }
        else {
            a.h = d.h;
        }
        if (c == null || c.g == null) {
            a.g = d != null ? d.g : null;
        }
        else if (d == null || d.j == null) {
            a.g = null;
        }
        else {
            a.g = d.g;
        }
    };
    CategoryItemHighlightLayerFrame.prototype.c = function (a, b, c) {
        var d = b;
        var e = c;
        this.f.e(this.g, a, d.g, e.g, d, e);
    };
    CategoryItemHighlightLayerFrame.$t = markType(CategoryItemHighlightLayerFrame, 'CategoryItemHighlightLayerFrame', Frame.$);
    return CategoryItemHighlightLayerFrame;
}(Frame));
export { CategoryItemHighlightLayerFrame };
