/*
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-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
 */
var PolarAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarAreaSeries, _super);
    function PolarAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = PolarAreaSeries.$;
        return _this;
    }
    PolarAreaSeries.prototype.bc = function () {
        return new PolarAreaSeries();
    };
    PolarAreaSeries.prototype.get_d9 = function () {
        return true;
    };
    PolarAreaSeries.prototype.cd = function () {
        return new PolarAreaSeriesView(this);
    };
    PolarAreaSeries.prototype.wt = function () {
        return false;
    };
    PolarAreaSeries.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.zo = a;
    };
    PolarAreaSeries.prototype.zm = function (a) {
        var b = a;
        b.c8();
    };
    PolarAreaSeries.prototype.zn = 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.c9(a.m, this.hk);
        this.v0.az(this, this.ws(), runOn(this, this.vi));
        var g = false;
        var h = this.v0.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            this.x7(-1, this.we.count, b.q);
        }
        var i = f.df;
        var j = f.de;
        this.v0.ad(i, true, false, true, true);
        this.v0.ad(j, false, true, false, false);
        j._opacity = this.v0.j * this.hg;
    };
    PolarAreaSeries.prototype.get_zj = function () {
        return true;
    };
    PolarAreaSeries.prototype.ze = function () {
        return this.zp;
    };
    PolarAreaSeries.$t = markType(PolarAreaSeries, 'PolarAreaSeries', PolarLineSeriesBase.$);
    PolarAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:zp:zr', [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.c7 = null;
        _this.dd = new Path();
        _this.dc = new Path();
        _this.db = new Path();
        _this.da = new Path();
        _this.c7 = a;
        return _this;
    }
    PolarAreaSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.c7.uc = Defaults.e;
        }
    };
    Object.defineProperty(PolarAreaSeriesView.prototype, "de", {
        get: function () {
            return this.dc;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(PolarAreaSeriesView.prototype, "df", {
        get: function () {
            return this.dd;
        },
        enumerable: false,
        configurable: true
    });
    PolarAreaSeriesView.prototype.c8 = function () {
        this.dc.an = null;
        this.dd.an = null;
        this.da.an = null;
        this.db.an = null;
        this.as();
    };
    PolarAreaSeriesView.prototype.c9 = function (a, b) {
        var c = new List$1(Point_$type, 1, a);
        this.c7.zb.d(this.dd, c, b);
        this.c7.zb.d(this.dc, c, b);
        this.as();
    };
    PolarAreaSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    PolarAreaSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        var a = this.br();
        this.db.an = this.dd.an;
        this.da.an = this.dc.an;
        this.db._stroke = a;
        this.db.ad = this.e.hl + 3;
        this.da._fill = a;
        this.da._opacity = 1;
    };
    PolarAreaSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.da);
                a.t(this.db);
            }
            else {
                a.t(this.dc);
                a.t(this.dd);
            }
        }
    };
    PolarAreaSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a5.exportPathData(a, this.dd, "polarShape", ["Main"]);
        this.e.a5.exportPathData(a, this.dc, "fillShape", ["Fill"]);
    };
    PolarAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s8 = a;
        this.e.is = 5;
        this.e.it = 5;
        this.e.iu = 5;
    };
    PolarAreaSeriesView.$t = markType(PolarAreaSeriesView, 'PolarAreaSeriesView', PolarLineSeriesBaseView.$);
    return PolarAreaSeriesView;
}(PolarLineSeriesBaseView));
export { PolarAreaSeriesView };
