/*
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-angular-core";
import { runOn, markType, markDep } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { PolarLineSeriesBaseView } from "./PolarLineSeriesBaseView";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-angular-core";
import { Numeric } from "igniteui-angular-core";
import { Color } from "igniteui-angular-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_eh = function () {
        return true;
    };
    PolarSplineSeries.prototype.bx = function () {
        return new PolarSplineSeriesView(this);
    };
    PolarSplineSeries.prototype.l2 = function (a) {
        _super.prototype.l2.call(this, a);
        this.vk = a;
    };
    PolarSplineSeries.prototype.l7 = function (a, b, c, d) {
        _super.prototype.l7.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineSeries.$$p[0]:
                this.ml(false);
                break;
        }
    };
    PolarSplineSeries.prototype.vi = function (a) {
        var b = a;
        b.c5();
    };
    PolarSplineSeries.prototype.vj = function (a, b) {
        this.vi(b);
        var c = b;
        c.c6(a.m, this.vl);
        this.sa.ax(this, this.sx(), runOn(this, this.rn));
        var d = false;
        var e = this.sa.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.t5(-1, this.sj.count, b.q);
        }
        this.sa.ad(b.c8, true, false, true, false);
    };
    PolarSplineSeries.$t = markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:vl:vn', [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.c4 = null;
        _this.c8 = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c7 = ((function () {
            var $ret = new Path();
            $ret.ak = new PathGeometry();
            return $ret;
        })());
        _this.c4 = a;
        return _this;
    }
    PolarSplineSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.b1.qh = Defaults.e;
        }
        var a = new PathGeometry();
        a.c.add(((function () {
            var $ret = new PathFigure();
            return $ret;
        })()));
        this.c8.ak = a;
    };
    PolarSplineSeriesView.prototype.c5 = function () {
        Extensions.e(this.c8.ak);
        Extensions.e(this.c7.ak);
        this.aq();
    };
    PolarSplineSeriesView.prototype.c6 = function (a, b) {
        this.c8.ak.c = Numeric.h(a.count, function (c) { return a._inner[c].x; }, function (c) { return a._inner[c].y; }, b);
        this.aq();
    };
    PolarSplineSeriesView.prototype.bb = function () {
        _super.prototype.bb.call(this);
    };
    PolarSplineSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        var a = this.bo();
        this.c7.ak = this.c8.ak;
        this.c7._stroke = a;
        this.c7.ac = this.e.fw + 3;
    };
    PolarSplineSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.c7);
            }
            else {
                a.t(this.c8);
            }
        }
    };
    PolarSplineSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a8.exportPathData(a, this.c8, "polarShape", ["Main"]);
    };
    PolarSplineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.pf = a;
        this.e.gy = 3;
        this.e.gz = 1;
        this.e.g0 = 4;
        this.e.e9 = false;
    };
    PolarSplineSeriesView.$t = markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineSeriesView };
