/*
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 { Extensions } from "igniteui-react-core";
import { Numeric } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let PolarSplineAreaSeries = /*@__PURE__*/ (() => {
    class PolarSplineAreaSeries extends PolarLineSeriesBase {
        bi() {
            return new PolarSplineAreaSeries();
        }
        zq() {
            return false;
        }
        get_es() {
            return true;
        }
        get_fy() {
            return true;
        }
        cq() {
            return new PolarSplineAreaSeriesView(this);
        }
        qx(a) {
            super.qx(a);
            this.acm = a;
        }
        constructor() {
            super();
            this.ab = PolarSplineAreaSeries.$;
        }
        ack(a) {
            let b = a;
            b.da();
        }
        acl(a, b) {
            this.ack(b);
            if (a.m.count < 1) {
                return;
            }
            let c = b;
            c.db(a.m, this.acn);
            this.yx.az(this, this.zp(), runOn(this, this.yf));
            let d = false;
            let e = this.yx.b;
            if (e != null) {
                d = true;
            }
            if (d) {
                this.aa4(-1, this.zb.count, b.q);
            }
            let f = c.dh;
            let g = c.dg;
            this.yx.ad(f, true, false, true, true);
            this.yx.ad(g, false, true, false, false);
            g._opacity = this.yx.j * this.h7;
        }
        get_ach() {
            return true;
        }
        q5(a, b, c, d) {
            super.q5(a, b, c, d);
            switch (b) {
                case PolarSplineAreaSeries.$$p[0]:
                    this.rn(false);
                    break;
            }
        }
    }
    PolarSplineAreaSeries.$t = /*@__PURE__*/ markType(PolarSplineAreaSeries, 'PolarSplineAreaSeries', PolarLineSeriesBase.$);
    PolarSplineAreaSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarSplineAreaSeries, 'raisePropertyChanged', ['Stiffness:acn:acp', [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.w2 = 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.ic + 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.bb.exportPathData(a, this.df, "polarShape", ["Main"]);
            this.e.bb.exportPathData(a, this.de, "fillShape", ["Fill"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.vv = a;
            this.e.jk = 5;
            this.e.jl = 5;
            this.e.jm = 5;
        }
    }
    PolarSplineAreaSeriesView.$t = /*@__PURE__*/ markType(PolarSplineAreaSeriesView, 'PolarSplineAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineAreaSeriesView;
})();
