/*
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 { ScatterFrameBase$1 } from "./ScatterFrameBase$1";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { Point_$type, typeCast, markType } from "igniteui-react-core/ES5/type";
import { Frame } from "./Frame";
import { isNaN_, isInfinity } from "igniteui-react-core/ES5/number";
/**
 * @hidden
 */
var PolarFrame = /** @class */ (function (_super) {
    tslib_1.__extends(PolarFrame, _super);
    function PolarFrame() {
        var _this = _super.call(this, PolarFrame.$) || this;
        _this.w = null;
        _this.v = false;
        _this.x = null;
        _this.w = new List$1(Point_$type, 0);
        _this.v = true;
        return _this;
    }
    PolarFrame.prototype.r = function (a, b, c) {
        var d = typeCast(PolarFrame.$, b);
        var e = typeCast(PolarFrame.$, c);
        if (d == null || e == null) {
            return;
        }
        Frame.a(this.w, a, d.w, e.w);
    };
    PolarFrame.prototype.q = function (a, b, c, d) {
        if (this.v) {
            _super.prototype.q.call(this, a, b, c, d);
        }
        else {
            _super.prototype.q.call(this, a, b, c, d);
            if (c != null && d != null && (c.b.x != d.b.x || c.b.y != d.b.y)) {
                var e = 1 - b;
                a.b = { $type: Point_$type, x: c.b.x * e + d.b.x * b, y: c.b.y * e + d.b.y * b };
            }
        }
    };
    PolarFrame.prototype.u = function (a) {
        return !isNaN_(a.x) && !isNaN_(a.y) && !isInfinity(a.x) && !isInfinity(a.y);
    };
    PolarFrame.prototype.t = function (a, b, c, d) {
        if (this.v) {
            _super.prototype.t.call(this, a, b, c, d);
        }
        else {
            if (c != null && d != null && (c.c.x != d.c.x || c.c.y != d.c.y) && this.u(a.b)) {
                a.c = this.x(a.b);
            }
            else {
                _super.prototype.t.call(this, a, b, c, d);
            }
        }
    };
    PolarFrame.$t = markType(PolarFrame, 'PolarFrame', ScatterFrameBase$1.$.specialize(-1)).initSelfReferences();
    return PolarFrame;
}(ScatterFrameBase$1));
export { PolarFrame };
