/*
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-react-core";
import { runOn, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { Numeric } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let PolarSplineSeries = /*@__PURE__*/ (() => {
    class PolarSplineSeries extends PolarLineSeriesBase {
        get_fd() {
            return true;
        }
        cg() {
            return new PolarSplineSeriesView(this);
        }
        o0(a) {
            super.o0(a);
            this.zm = a;
        }
        constructor() {
            super();
            this.ab = PolarSplineSeries.$;
        }
        o8(a, b, c, d) {
            super.o8(a, b, c, d);
            switch (b) {
                case PolarSplineSeries.$$p[0]:
                    this.pp(false);
                    break;
            }
        }
        zk(a) {
            let b = a;
            b.c8();
        }
        zl(a, b) {
            this.zk(b);
            let c = b;
            c.c9(a.m, this.zn);
            this.v3.az(this, this.wq(), runOn(this, this.vg));
            let d = false;
            let e = this.v3.b;
            if (e != null) {
                d = true;
            }
            if (d) {
                this.x5(-1, this.wc.count, b.q);
            }
            this.v3.ad(b.db, true, false, true, false);
        }
    }
    PolarSplineSeries.$t = /*@__PURE__*/ markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:zn:zp', [1, 0.5]]);
    return PolarSplineSeries;
})();
/**
 * @hidden
 */
export let PolarSplineSeriesView = /*@__PURE__*/ (() => {
    class PolarSplineSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.c7 = null;
            this.db = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.da = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c7 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.b4.ua = Defaults.e;
            }
            let a = new PathGeometry();
            a.c.add(((() => {
                let $ret = new PathFigure();
                return $ret;
            })()));
            this.db.an = a;
        }
        c8() {
            Extensions.e(this.db.an);
            Extensions.e(this.da.an);
            this.as();
        }
        c9(a, b) {
            this.db.an.c = Numeric.h(a.count, (c) => a._inner[c].x, (c) => a._inner[c].y, b);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.da.an = this.db.an;
            this.da._stroke = a;
            this.da.ad = this.e.hk + 3;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.da);
                }
                else {
                    a.t(this.db);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.a9.exportPathData(a, this.db, "polarShape", ["Main"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s6 = a;
            this.e.ir = 3;
            this.e.is = 1;
            this.e.it = 4;
            this.e.gj = false;
        }
    }
    PolarSplineSeriesView.$t = /*@__PURE__*/ markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
})();
