/*
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/ES2015/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES2015/DependencyProperty";
import { Type, enumGetBox, markType, Point_$type } from "igniteui-react-core/ES2015/type";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { PropertyMetadata } from "igniteui-react-core/ES2015/PropertyMetadata";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { Path } from "igniteui-react-core/ES2015/Path";
import { Color } from "igniteui-react-core/ES2015/Color";
/**
 * @hidden
 */
export class PolarAreaSeries extends PolarLineSeriesBase {
    constructor() {
        super();
        this.ab = PolarAreaSeries.$;
    }
    bf() {
        return new PolarAreaSeriesView(this);
    }
    im(a) {
        super.im(a);
        this.o6 = a;
    }
    o4(a) {
        let b = a;
        b.c0();
    }
    o5(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.c3._opacity = this.d3;
        f.c1(a.m, this.er);
    }
    get_o1() {
        return true;
    }
    ow() {
        return this.o7;
    }
}
PolarAreaSeries.$t = markType(PolarAreaSeries, 'PolarAreaSeries', PolarLineSeriesBase.$);
Type.dep(DependencyProperty, PropertyMetadata, PolarAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:o7:o9', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
export class PolarAreaSeriesView extends PolarLineSeriesBaseView {
    constructor(a) {
        super(a);
        this.cz = null;
        this.c4 = new Path();
        this.c2 = new Path();
        this.cz = a;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.bj = 1;
        }
    }
    get c3() {
        return this.c2;
    }
    c0() {
        this.c2.aj = null;
        this.c4.aj = null;
        this.an();
    }
    c1(a, b) {
        let c = new List$1(Point_$type, 1, a);
        this.cz.ot.d(this.c4, c, b);
        this.cz.ot.d(this.c2, c, b);
        this.an();
    }
    a8() {
        super.a8();
        this.c4._stroke = this.e.kx;
        this.c4.ac = this.e.ev;
        this.c4.ai = this.e.k4;
        this.c4.ad = this.e.k5;
        this.c2._fill = this.e.kw;
        this.c2._opacity = this.e.d3;
    }
    a9() {
        super.a9();
        let a = this.bl();
        this.c4._stroke = a;
        this.c4.ac = this.e.ev + 3;
        this.c2._fill = a;
        this.c2._opacity = 1;
    }
    a3(a, b) {
        super.a3(a, b);
        if (a.d) {
            a.s(this.c2);
            a.s(this.c4);
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.c4, "polarShape", ["Main"]);
        this.e.a2.exportPathData(a, this.c2, "fillShape", ["Fill"]);
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k3 = a;
        this.e.es = 5;
        this.e.et = 5;
        this.e.eu = 5;
    }
}
PolarAreaSeriesView.$t = markType(PolarAreaSeriesView, 'PolarAreaSeriesView', PolarLineSeriesBaseView.$);
