/*
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 { Defaults } from "./Defaults";
import { Extensions } from "igniteui-angular-core";
import { Numeric } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PolarSplineAreaSeries = /*@__PURE__*/ (() => {
    class PolarSplineAreaSeries extends PolarLineSeriesBase {
        constructor() {
            super();
            this.ab = PolarSplineAreaSeries.$;
        }
        bj() {
            return new PolarSplineAreaSeries();
        }
        zy() {
            return false;
        }
        get_eu() {
            return true;
        }
        get_f0() {
            return true;
        }
        cs() {
            return new PolarSplineAreaSeriesView(this);
        }
        q1(a) {
            super.q1(a);
            this.acu = a;
        }
        acs(a) {
            let b = a;
            b.da();
        }
        act(a, b) {
            this.acs(b);
            if (a.m.count < 1) {
                return;
            }
            let c = b;
            c.db(a.m, this.acv);
            this.y5.az(this, this.zx(), runOn(this, this.yn));
            let d = false;
            let e = this.y5.b;
            if (e != null) {
                d = true;
            }
            if (d) {
                this.abc(-1, this.zj.count, b.q);
            }
            let f = c.dh;
            let g = c.dg;
            this.y5.ad(f, true, false, true, true);
            this.y5.ad(g, false, true, false, false);
            g._opacity = this.y5.j * this.h9;
        }
        get_acp() {
            return true;
        }
        q9(a, b, c, d) {
            super.q9(a, b, c, d);
            switch (b) {
                case PolarSplineAreaSeries.$$p[0]:
                    this.rr(false);
                    break;
            }
        }
    }
    PolarSplineAreaSeries.$t = markType(PolarSplineAreaSeries, 'PolarSplineAreaSeries', PolarLineSeriesBase.$);
    PolarSplineAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineAreaSeries, 'raisePropertyChanged', ['Stiffness:acv:acx', [1, 0.5]]);
    return PolarSplineAreaSeries;
})();
/**
 * @hidden
 */
export let PolarSplineAreaSeriesView = /*@__PURE__*/ (() => {
    class PolarSplineAreaSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.c9 = null;
            this.df = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.de = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            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.c9.xa = Defaults.e;
            }
        }
        get dg() {
            return this.de;
        }
        get dh() {
            return this.df;
        }
        da() {
            Extensions.e(this.de.an);
            Extensions.e(this.df.an);
            Extensions.e(this.dc.an);
            Extensions.e(this.dd.an);
            this.as();
        }
        db(a, b) {
            this.df.an.c = Numeric.h(a.count + 1, (c) => c < a.count ? a._inner[c].x : a._inner[c - a.count].x, (c) => c < a.count ? a._inner[c].y : a._inner[c - a.count].y, b);
            this.de.an.c = Numeric.h(a.count + 1, (c) => c < a.count ? a._inner[c].x : a._inner[c - a.count].x, (c) => c < a.count ? a._inner[c].y : a._inner[c - a.count].y, b);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.dc.an = this.de.an;
            this.dd.an = this.df.an;
            this.dc._fill = a;
            this.dc._opacity = 1;
            this.dd._stroke = a;
            this.dd.ad = this.e.ie + 3;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dc);
                    a.t(this.dd);
                }
                else {
                    a.t(this.de);
                    a.t(this.df);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bc.exportPathData(a, this.df, "polarShape", ["Main"]);
            this.e.bc.exportPathData(a, this.de, "fillShape", ["Fill"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.v1 = a;
            this.e.jm = 5;
            this.e.jn = 5;
            this.e.jo = 5;
        }
    }
    PolarSplineAreaSeriesView.$t = markType(PolarSplineAreaSeriesView, 'PolarSplineAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineAreaSeriesView;
})();
