/*
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 { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { runOn, enumGetBox, markType, markDep, Point_$type } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { Defaults } from "./Defaults";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let PolarAreaSeries = /*@__PURE__*/ (() => {
    class PolarAreaSeries extends PolarLineSeriesBase {
        get_d8() {
            return true;
        }
        cg() {
            return new PolarAreaSeriesView(this);
        }
        wr() {
            return false;
        }
        o0(a) {
            super.o0(a);
            this.zm = a;
        }
        constructor() {
            super();
            this.ab = PolarAreaSeries.$;
        }
        zk(a) {
            let b = a;
            b.c8();
        }
        zl(a, b) {
            if (a.m.count > 0) {
                let c = a.m._inner[0];
                let d = a.m._inner[a.m.count - 1];
                let e = c.x == d.x && c.y == d.y;
                if (!e) {
                    a.m.add(a.m._inner[0]);
                }
            }
            let f = b;
            f.c9(a.m, this.hj);
            this.v3.az(this, this.wq(), runOn(this, this.vg));
            let g = false;
            let h = this.v3.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                this.x5(-1, this.wc.count, b.q);
            }
            let i = f.df;
            let j = f.de;
            this.v3.ad(i, true, false, true, true);
            this.v3.ad(j, false, true, false, false);
            j._opacity = this.v3.j * this.hf;
        }
        get_zh() {
            return true;
        }
        zc() {
            return this.zn;
        }
    }
    PolarAreaSeries.$t = /*@__PURE__*/ markType(PolarAreaSeries, 'PolarAreaSeries', PolarLineSeriesBase.$);
    PolarAreaSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:zn:zp', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return PolarAreaSeries;
})();
/**
 * @hidden
 */
export let PolarAreaSeriesView = /*@__PURE__*/ (() => {
    class PolarAreaSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.c7 = null;
            this.dd = new Path();
            this.dc = new Path();
            this.db = new Path();
            this.da = new Path();
            this.c7 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.c7.ua = Defaults.e;
            }
        }
        get de() {
            return this.dc;
        }
        get df() {
            return this.dd;
        }
        c8() {
            this.dc.an = null;
            this.dd.an = null;
            this.da.an = null;
            this.db.an = null;
            this.as();
        }
        c9(a, b) {
            let c = new List$1(Point_$type, 1, a);
            this.c7.y9.d(this.dd, c, b);
            this.c7.y9.d(this.dc, c, b);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.db.an = this.dd.an;
            this.da.an = this.dc.an;
            this.db._stroke = a;
            this.db.ad = this.e.hk + 3;
            this.da._fill = a;
            this.da._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.da);
                    a.t(this.db);
                }
                else {
                    a.t(this.dc);
                    a.t(this.dd);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.a9.exportPathData(a, this.dd, "polarShape", ["Main"]);
            this.e.a9.exportPathData(a, this.dc, "fillShape", ["Fill"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s6 = a;
            this.e.ir = 5;
            this.e.is = 5;
            this.e.it = 5;
        }
    }
    PolarAreaSeriesView.$t = /*@__PURE__*/ markType(PolarAreaSeriesView, 'PolarAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarAreaSeriesView;
})();
