/*
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 { ScatterFrameBase$1 } from "./ScatterFrameBase$1";
import { List$1 } from "igniteui-angular-core";
import { Point_$type, typeCast, markType } from "igniteui-angular-core";
import { Frame } from "./Frame";
import { isNaN_, isInfinity } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PolarFrame = /*@__PURE__*/ (() => {
    class PolarFrame extends ScatterFrameBase$1 {
        constructor() {
            super(PolarFrame.$);
            this.x = null;
            this.w = false;
            this.y = null;
            this.x = new List$1(Point_$type, 0);
            this.w = true;
        }
        s(a, b, c) {
            let d = typeCast(PolarFrame.$, b);
            let e = typeCast(PolarFrame.$, c);
            if (d == null || e == null) {
                return;
            }
            Frame.a(this.x, a, d.x, e.x);
        }
        r(a, b, c, d) {
            if (this.w) {
                super.r(a, b, c, d);
            }
            else {
                super.r(a, b, c, d);
                if (c != null && d != null && (c.b.x != d.b.x || c.b.y != d.b.y)) {
                    let 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 };
                }
            }
        }
        v(a) {
            return !isNaN_(a.x) && !isNaN_(a.y) && !isInfinity(a.x) && !isInfinity(a.y);
        }
        u(a, b, c, d) {
            if (this.w) {
                super.u(a, b, c, d);
            }
            else {
                if (c != null && d != null && (c.c.x != d.c.x || c.c.y != d.c.y) && this.v(a.b)) {
                    a.c = this.y(a.b);
                }
                else {
                    super.u(a, b, c, d);
                }
            }
        }
    }
    PolarFrame.$t = markType(PolarFrame, 'PolarFrame', ScatterFrameBase$1.$.specialize(-1)).initSelfReferences();
    return PolarFrame;
})();
