"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PolarTextRenderableSeries = void 0;
var SeriesType_1 = require("../../../../types/SeriesType");
var ResamplingMode_1 = require("../../../Numerics/Resamplers/ResamplingMode");
var FastTextRenderableSeries_1 = require("../FastTextRenderableSeries");
var PolarTextDataLabelProvider_1 = require("./DataLabels/PolarTextDataLabelProvider");
var PolarPointMarkerDrawingProvider_1 = require("./DrawingProviders/PolarPointMarkerDrawingProvider");
var PolarDataPointHitTestProvider_1 = require("./HitTest/PolarDataPointHitTestProvider");
/**
 * Defines a polar text series in the SciChart's High Performance Real-time
 *
 * ---
 * 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/polar-text-renderable-series/}.
 */
var PolarTextRenderableSeries = /** @class */ (function (_super) {
    __extends(PolarTextRenderableSeries, _super);
    function PolarTextRenderableSeries(webAssemblyContext, options) {
        var _this = this;
        var _a;
        _this = _super.call(this, webAssemblyContext, __assign(__assign({}, options), { dataLabelProvider: (_a = options === null || options === void 0 ? void 0 : options.dataLabelProvider) !== null && _a !== void 0 ? _a : new PolarTextDataLabelProvider_1.PolarTextDataLabelProvider(options === null || options === void 0 ? void 0 : options.dataLabels) })) || this;
        _this.isPolar = true;
        _this.type = SeriesType_1.ESeriesType.PolarTextSeries;
        return _this;
    }
    /** @inheritDoc */
    PolarTextRenderableSeries.prototype.addDrawingProviders = function (webAssemblyContext, options) {
        this.drawingProviders.push(new PolarPointMarkerDrawingProvider_1.PolarPointMarkerDrawingProvider(webAssemblyContext, this));
    };
    /** @inheritDoc */
    PolarTextRenderableSeries.prototype.needsResampling = function (rp) {
        if (this.dataSeries.fifoCapacity) {
            rp.resamplingMode = ResamplingMode_1.EResamplingMode.None;
            this.resamplerHelper.resetAndFillBasicNativeArgs(rp, this.getNativeXValues());
            return true;
        }
        return false;
    };
    PolarTextRenderableSeries.prototype.newHitTestProvider = function () {
        return new PolarDataPointHitTestProvider_1.PolarDataPointHitTestProvider(this, this.webAssemblyContext);
    };
    return PolarTextRenderableSeries;
}(FastTextRenderableSeries_1.FastTextRenderableSeries));
exports.PolarTextRenderableSeries = PolarTextRenderableSeries;
