/*
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 { Defaults } from "./Defaults";
import { PathFigure } from "igniteui-react-core";
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.bi = function () {
        return new PolarSplineSeries();
    };
    PolarSplineSeries.prototype.get_fy = function () {
        return true;
    };
    PolarSplineSeries.prototype.cq = function () {
        return new PolarSplineSeriesView(this);
    };
    PolarSplineSeries.prototype.qx = function (a) {
        _super.prototype.qx.call(this, a);
        this.acm = a;
    };
    PolarSplineSeries.prototype.q5 = function (a, b, c, d) {
        _super.prototype.q5.call(this, a, b, c, d);
        switch (b) {
            case PolarSplineSeries.$$p[0]:
                this.rn(false);
                break;
        }
    };
    PolarSplineSeries.prototype.ack = function (a) {
        var b = a;
        b.da();
    };
    PolarSplineSeries.prototype.acl = function (a, b) {
        this.ack(b);
        var c = b;
        c.db(a.m, this.acn);
        this.yx.az(this, this.zp(), runOn(this, this.yf));
        var d = false;
        var e = this.yx.b;
        if (e != null) {
            d = true;
        }
        if (d) {
            this.aa4(-1, this.zb.count, b.q);
        }
        this.yx.ad(b.dd, true, false, true, false);
    };
    PolarSplineSeries.$t = markType(PolarSplineSeries, 'PolarSplineSeries', PolarLineSeriesBase.$);
    PolarSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, PolarSplineSeries, 'raisePropertyChanged', ['Stiffness:acn:acp', [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.w2 = 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.ic + 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.bb.exportPathData(a, this.dd, "polarShape", ["Main"]);
    };
    PolarSplineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vv = a;
        this.e.jk = 3;
        this.e.jl = 1;
        this.e.jm = 4;
        this.e.ha = false;
    };
    PolarSplineSeriesView.$t = markType(PolarSplineSeriesView, 'PolarSplineSeriesView', PolarLineSeriesBaseView.$);
    return PolarSplineSeriesView;
}(PolarLineSeriesBaseView));
export { PolarSplineSeriesView };
