/*
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 { PolarLineSeriesBase } from "./PolarLineSeriesBase";
import { DependencyProperty } from "igniteui-angular-core";
import { runOn, markType, markDep } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-angular-core";
import { Numeric } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PolarSplineSeries = /*@__PURE__*/ (() => {
    class PolarSplineSeries extends PolarLineSeriesBase {
        constructor() {
            super();
            this.ab = PolarSplineSeries.$;
        }
        get_eg() {
            return true;
        }
        bx() {
            return new PolarSplineSeriesView(this);
        }
        ly(a) {
            super.ly(a);
            this.vf = a;
        }
        l3(a, b, c, d) {
            super.l3(a, b, c, d);
            switch (b) {
                case PolarSplineSeries.$$p[0]:
                    this.mh(false);
                    break;
            }
        }
        vd(a) {
            let b = a;
            b.c5();
        }
        ve(a, b) {
            this.vd(b);
            let c = b;
            c.c6(a.m, this.vg);
            this.r5.ax(this, this.ss(), runOn(this, this.ri));
            let d = false;
            let e = this.r5.b;
            if (e != null) {
                d = true;
            }
            if (d) {
                this.t0(-1, this.se.count, b.q);
            }
            this.r5.ad(b.c8, true, false, true, false);
        }
    }
    PolarSplineSeries.$t = markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:vg:vi', [1, 0.5]]);
    return PolarSplineSeries;
})();
/**
 * @hidden
 */
export let PolarSplineSeriesView = /*@__PURE__*/ (() => {
    class PolarSplineSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.c4 = null;
            this.c8 = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.c7 = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.c4 = a;
        }
        as() {
            super.as();
            if (!this.q) {
                this.b1.qc = Defaults.e;
            }
            let a = new PathGeometry();
            a.c.add(((() => {
                let $ret = new PathFigure();
                return $ret;
            })()));
            this.c8.ak = a;
        }
        c5() {
            Extensions.e(this.c8.ak);
            Extensions.e(this.c7.ak);
            this.aq();
        }
        c6(a, b) {
            this.c8.ak.c = Numeric.h(a.count, (c) => a._inner[c].x, (c) => a._inner[c].y, b);
            this.aq();
        }
        bb() {
            super.bb();
        }
        bc() {
            super.bc();
            let a = this.bo();
            this.c7.ak = this.c8.ak;
            this.c7._stroke = a;
            this.c7.ac = this.e.fu + 3;
        }
        a6(a, b) {
            super.a6(a, b);
            if (a.d) {
                if (b) {
                    a.s(this.c7);
                }
                else {
                    a.s(this.c8);
                }
            }
        }
        al(a) {
            super.al(a);
            this.e.a8.exportPathData(a, this.c8, "polarShape", ["Main"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.pa = a;
            this.e.gw = 3;
            this.e.gx = 1;
            this.e.gy = 4;
            this.e.e7 = false;
        }
    }
    PolarSplineSeriesView.$t = markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
})();
