/*
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 { DependencyProperty } from "igniteui-react-core";
import { runOn, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { Numeric } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var PolarSplineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarSplineSeries, _super);
    function PolarSplineSeries() {
        var _this = _super.call(this) || this;
        _this.ab = PolarSplineSeries.$;
        return _this;
    }
    PolarSplineSeries.prototype.get_fd = function () {
        return true;
    };
    PolarSplineSeries.prototype.cg = function () {
        return new PolarSplineSeriesView(this);
    };
    PolarSplineSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.zm = a;
    };
    PolarSplineSeries.prototype.o8 = function (a, b, c, d) {
        _super.prototype.o8.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineSeries.$$p[0]:
                this.pp(false);
                break;
        }
    };
    PolarSplineSeries.prototype.zk = function (a) {
        var b = a;
        b.c8();
    };
    PolarSplineSeries.prototype.zl = function (a, b) {
        this.zk(b);
        var c = b;
        c.c9(a.m, this.zn);
        this.v3.az(this, this.wq(), runOn(this, this.vg));
        var d = false;
        var e = this.v3.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.x5(-1, this.wc.count, b.q);
        }
        this.v3.ad(b.db, true, false, true, false);
    };
    PolarSplineSeries.$t = markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:zn:zp', [1, 0.5]]);
    return PolarSplineSeries;
}(PolarLineSeriesBase));
export { PolarSplineSeries };
/**
 * @hidden
 */
var PolarSplineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarSplineSeriesView, _super);
    function PolarSplineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c7 = null;
        _this.db = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.da = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.c7 = a;
        return _this;
    }
    PolarSplineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.b4.ua = Defaults.e;
        }
        var a = new PathGeometry();
        a.c.add(((function () {
            var $ret = new PathFigure();
            return $ret;
        })()));
        this.db.an = a;
    };
    PolarSplineSeriesView.prototype.c8 = function () {
        Extensions.e(this.db.an);
        Extensions.e(this.da.an);
        this.as();
    };
    PolarSplineSeriesView.prototype.c9 = function (a, b) {
        this.db.an.c = Numeric.h(a.count, function (c) { return a._inner[c].x; }, function (c) { return a._inner[c].y; }, b);
        this.as();
    };
    PolarSplineSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    PolarSplineSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        var a = this.br();
        this.da.an = this.db.an;
        this.da._stroke = a;
        this.da.ad = this.e.hk + 3;
    };
    PolarSplineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.da);
            }
            else {
                a.t(this.db);
            }
        }
    };
    PolarSplineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a9.exportPathData(a, this.db, "polarShape", ["Main"]);
    };
    PolarSplineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s6 = a;
        this.e.ir = 3;
        this.e.is = 1;
        this.e.it = 4;
        this.e.gj = false;
    };
    PolarSplineSeriesView.$t = markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineSeriesView };
