/*
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 { Defaults } from "./Defaults";
import { PathFigure } from "igniteui-angular-core";
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.bj = function () {
        return new PolarSplineSeries();
    };
    PolarSplineSeries.prototype.get_f0 = function () {
        return true;
    };
    PolarSplineSeries.prototype.cs = function () {
        return new PolarSplineSeriesView(this);
    };
    PolarSplineSeries.prototype.qz = function (a) {
        _super.prototype.qz.call(this, a);
        this.acs = a;
    };
    PolarSplineSeries.prototype.q7 = function (a, b, c, d) {
        _super.prototype.q7.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineSeries.$$p[0]:
                this.rp(false);
                break;
        }
    };
    PolarSplineSeries.prototype.acq = function (a) {
        var b = a;
        b.da();
    };
    PolarSplineSeries.prototype.acr = function (a, b) {
        this.acq(b);
        var c = b;
        c.db(a.m, this.act);
        this.y3.az(this, this.zv(), runOn(this, this.yl));
        var d = false;
        var e = this.y3.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.aba(-1, this.zh.count, b.q);
        }
        this.y3.ad(b.dd, true, false, true, false);
    };
    PolarSplineSeries.$t = markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:act:acv', [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.c9 = null;
        _this.dd = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.dc = ((function () {
            var $ret = new Path();
            $ret.an = new PathGeometry();
            return $ret;
        })());
        _this.c9 = a;
        return _this;
    }
    PolarSplineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.b4.w8 = Defaults.e;
        }
        var a = new PathGeometry();
        a.c.add(((function () {
            var $ret = new PathFigure();
            return $ret;
        })()));
        this.dd.an = a;
    };
    PolarSplineSeriesView.prototype.da = function () {
        Extensions.e(this.dd.an);
        Extensions.e(this.dc.an);
        this.as();
    };
    PolarSplineSeriesView.prototype.db = function (a, b) {
        this.dd.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.dc.an = this.dd.an;
        this.dc._stroke = a;
        this.dc.ad = this.e.ie + 3;
    };
    PolarSplineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dc);
            }
            else {
                a.t(this.dd);
            }
        }
    };
    PolarSplineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.bc.exportPathData(a, this.dd, "polarShape", ["Main"]);
    };
    PolarSplineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vz = a;
        this.e.jm = 3;
        this.e.jn = 1;
        this.e.jo = 4;
        this.e.hc = false;
    };
    PolarSplineSeriesView.$t = markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineSeriesView };
