/*
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 { Defaults } from "./Defaults";
import { PathFigure } from "igniteui-react-core";
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 {
        bj() {
            return new PolarSplineSeries();
        }
        get_f0() {
            return true;
        }
        cs() {
            return new PolarSplineSeriesView(this);
        }
        qz(a) {
            super.qz(a);
            this.acs = a;
        }
        constructor() {
            super();
            this.ab = PolarSplineSeries.$;
        }
        q7(a, b, c, d) {
            super.q7(a, b, c, d);
            switch (b) {
                case PolarSplineSeries.$$p[0]:
                    this.rp(false);
                    break;
            }
        }
        acq(a) {
            let b = a;
            b.da();
        }
        acr(a, b) {
            this.acq(b);
            let c = b;
            c.db(a.m, this.act);
            this.y3.az(this, this.zv(), runOn(this, this.yl));
            let d = false;
            let e = this.y3.b;
            if (e != null) {
                d = true;
            }
            if (d) {
                this.aba(-1, this.zh.count, b.q);
            }
            this.y3.ad(b.dd, true, false, true, false);
        }
    }
    PolarSplineSeries.$t = /*@__PURE__*/ markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:act:acv', [1, 0.5]]);
    return PolarSplineSeries;
})();
/**
 * @hidden
 */
export let PolarSplineSeriesView = /*@__PURE__*/ (() => {
    class PolarSplineSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.c9 = null;
            this.dd = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.dc = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c9 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.b4.w8 = Defaults.e;
            }
            let a = new PathGeometry();
            a.c.add(((() => {
                let $ret = new PathFigure();
                return $ret;
            })()));
            this.dd.an = a;
        }
        da() {
            Extensions.e(this.dd.an);
            Extensions.e(this.dc.an);
            this.as();
        }
        db(a, b) {
            this.dd.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.dc.an = this.dd.an;
            this.dc._stroke = a;
            this.dc.ad = this.e.ie + 3;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dc);
                }
                else {
                    a.t(this.dd);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bc.exportPathData(a, this.dd, "polarShape", ["Main"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.vz = a;
            this.e.jm = 3;
            this.e.jn = 1;
            this.e.jo = 4;
            this.e.hc = false;
        }
    }
    PolarSplineSeriesView.$t = /*@__PURE__*/ markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
})();
