/*
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 { __extends } from "tslib";
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
 */
var PolarAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarAreaSeries, _super);
    function PolarAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = PolarAreaSeries.$;
        return _this;
    }
    PolarAreaSeries.prototype.get_df = function () {
        return true;
    };
    PolarAreaSeries.prototype.by = function () {
        return new PolarAreaSeriesView(this);
    };
    PolarAreaSeries.prototype.l4 = function (a) {
        _super.prototype.l4.call(this, a);
        this.vo = a;
    };
    PolarAreaSeries.prototype.vm = function (a) {
        var b = a;
        b.c5();
    };
    PolarAreaSeries.prototype.vn = function (a, b) {
        if (a.m.count > 0) {
            var c = a.m._inner[0];
            var d = a.m._inner[a.m.count - 1];
            var e = c.x == d.x && c.y == d.y;
            if (!e) {
                a.m.add(a.m._inner[0]);
            }
        }
        var f = b;
        f.c6(a.m, this.fx);
        this.se.az(this, this.s1(), runOn(this, this.rr));
        var g = false;
        var h = this.se.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            this.t9(-1, this.sn.count, b.q);
        }
        var i = f.dc;
        var j = f.db;
        this.se.ad(i, true, false, true, true);
        this.se.ad(j, false, true, false, false);
        j._opacity = this.se.j * this.fu;
    };
    PolarAreaSeries.prototype.get_vj = function () {
        return true;
    };
    PolarAreaSeries.prototype.ve = function () {
        return this.vp;
    };
    PolarAreaSeries.$t = markType(PolarAreaSeries, 'PolarAreaSeries', PolarLineSeriesBase.$);
    PolarAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:vp:vr', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return PolarAreaSeries;
}(PolarLineSeriesBase));
export { PolarAreaSeries };
/**
 * @hidden
 */
var PolarAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarAreaSeriesView, _super);
    function PolarAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c4 = null;
        _this.da = new Path();
        _this.c9 = new Path();
        _this.c8 = new Path();
        _this.c7 = new Path();
        _this.c4 = a;
        return _this;
    }
    PolarAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.c4.ql = Defaults.e;
        }
    };
    Object.defineProperty(PolarAreaSeriesView.prototype, "db", {
        get: function () {
            return this.c9;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PolarAreaSeriesView.prototype, "dc", {
        get: function () {
            return this.da;
        },
        enumerable: false,
        configurable: true
    });
    PolarAreaSeriesView.prototype.c5 = function () {
        this.c9.an = null;
        this.da.an = null;
        this.c7.an = null;
        this.c8.an = null;
        this.aq();
    };
    PolarAreaSeriesView.prototype.c6 = function (a, b) {
        var c = new List$1(Point_$type, 1, a);
        this.c4.vb.d(this.da, c, b);
        this.c4.vb.d(this.c9, c, b);
        this.aq();
    };
    PolarAreaSeriesView.prototype.bb = function () {
        _super.prototype.bb.call(this);
    };
    PolarAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        var a = this.bo();
        this.c8.an = this.da.an;
        this.c7.an = this.c9.an;
        this.c8._stroke = a;
        this.c8.ad = this.e.fy + 3;
        this.c7._fill = a;
        this.c7._opacity = 1;
    };
    PolarAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.c7);
                a.t(this.c8);
            }
            else {
                a.t(this.c9);
                a.t(this.da);
            }
        }
    };
    PolarAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a9.exportPathData(a, this.da, "polarShape", ["Main"]);
        this.e.a9.exportPathData(a, this.c9, "fillShape", ["Fill"]);
    };
    PolarAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ph = a;
        this.e.g1 = 5;
        this.e.g2 = 5;
        this.e.g3 = 5;
    };
    PolarAreaSeriesView.$t = markType(PolarAreaSeriesView, 'PolarAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarAreaSeriesView;
}(PolarLineSeriesBaseView));
export { PolarAreaSeriesView };
