/*
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-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { runOn, enumGetBox, markType, markDep, Point_$type } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { Defaults } from "./Defaults";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PolarAreaSeries = /*@__PURE__*/ (() => {
    class PolarAreaSeries extends PolarLineSeriesBase {
        constructor() {
            super();
            this.ab = PolarAreaSeries.$;
        }
        bk() {
            return new PolarAreaSeries();
        }
        get_ew() {
            return true;
        }
        ct() {
            return new PolarAreaSeriesView(this);
        }
        z8() {
            return false;
        }
        q7(a) {
            super.q7(a);
            this.ac4 = a;
        }
        ac2(a) {
            let b = a;
            b.dn();
        }
        ac3(a, b) {
            if (a.n.count > 0) {
                let c = a.n._inner[0];
                let d = a.n._inner[a.n.count - 1];
                let e = c.x == d.x && c.y == d.y;
                if (!e) {
                    a.n.add(a.n._inner[0]);
                }
            }
            let f = b;
            f.dp(a.n, this.ie);
            this.zf.az(this, this.z7(), runOn(this, this.yx));
            let g = false;
            let h = this.zf.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                this.abm(-1, this.zt.count, b.t);
            }
            let i = f.dv;
            let j = f.du;
            this.zf.ad(i, true, false, true, true);
            this.zf.ad(j, false, true, false, false);
            j._opacity = this.zf.j * this.ia;
        }
        get_acz() {
            return true;
        }
        acu() {
            return this.ac5;
        }
    }
    PolarAreaSeries.$t = markType(PolarAreaSeries, 'PolarAreaSeries', PolarLineSeriesBase.$);
    PolarAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ac5:ac7', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return PolarAreaSeries;
})();
/**
 * @hidden
 */
export let PolarAreaSeriesView = /*@__PURE__*/ (() => {
    class PolarAreaSeriesView extends PolarLineSeriesBaseView {
        constructor(a) {
            super(a);
            this.dm = null;
            this.dt = new Path();
            this.ds = new Path();
            this.dr = new Path();
            this.dq = new Path();
            this.dm = a;
        }
        a4() {
            super.a4();
            if (!this.t) {
                this.dm.xk = Defaults.e;
            }
        }
        get du() {
            return this.ds;
        }
        get dv() {
            return this.dt;
        }
        dn() {
            this.ds.an = null;
            this.dt.an = null;
            this.dq.an = null;
            this.dr.an = null;
            this.a2();
        }
        dp(a, b) {
            let c = new List$1(Point_$type, 1, a);
            this.dm.acr.d(this.dt, c, b);
            this.dm.acr.d(this.ds, c, b);
            this.a2();
        }
        bp() {
            super.bp();
        }
        bq() {
            super.bq();
            let a = this.b3();
            this.dr.an = this.dt.an;
            this.dq.an = this.ds.an;
            this.dr._stroke = a;
            this.dr.ad = this.f.ig + 3;
            this.dq._fill = a;
            this.dq._opacity = 1;
        }
        bj(a, b) {
            super.bj(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dq);
                    a.t(this.dr);
                }
                else {
                    a.t(this.ds);
                    a.t(this.dt);
                }
            }
        }
        ax(a) {
            super.ax(a);
            this.f.bc.exportPathData(a, this.dt, "polarShape", ["Main"]);
            this.f.bc.exportPathData(a, this.ds, "fillShape", ["Fill"]);
        }
        an() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.f.wb = a;
            this.f.jq = 5;
            this.f.jr = 5;
            this.f.js = 5;
        }
    }
    PolarAreaSeriesView.$t = markType(PolarAreaSeriesView, 'PolarAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarAreaSeriesView;
})();
