import { __extends } from "tslib";
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-react-core";
import { OthersCategoryType_$type } from "igniteui-react-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-react-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { IgrRadialBaseChart } from "./igr-radial-base-chart";
import { ensureEnum, brushToString, stringToBrush, ensureBool, arrayFindByName } from "igniteui-react-core";
/**
 * Represents a base class for PieBase chart control that can plot scatter data
*/
var IgrDataPieBaseChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrDataPieBaseChart, _super);
    function IgrDataPieBaseChart(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrDataPieBaseChart.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sliceLabelFormat", {
        /**
         * Gets or sets the label format for the slices.
        */
        get: function () {
            return this.i.ai7;
        },
        set: function (v) {
            this.i.ai7 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sliceLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the labels for the slices.
        */
        get: function () {
            return this.i.ago;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.ago = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendSliceLabelFormat", {
        /**
         * Gets or sets the label format for the LegendSlices.
        */
        get: function () {
            return this.i.air;
        },
        set: function (v) {
            this.i.air = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendSliceLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the labels for the LegendSlices.
        */
        get: function () {
            return this.i.agm;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.agm = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "othersSliceLabelFormat", {
        /**
         * Gets or sets the label format for the OthersSlices.
        */
        get: function () {
            return this.i.ai0;
        },
        set: function (v) {
            this.i.ai0 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "othersSliceLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the labels for the OthersSlices.
        */
        get: function () {
            return this.i.agn;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.agn = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendOthersSliceLabelFormat", {
        /**
         * Gets or sets the label format for the LegendOthersSlices.
        */
        get: function () {
            return this.i.ain;
        },
        set: function (v) {
            this.i.ain = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendOthersSliceLabelFormatSpecifiers", {
        /**
         * Gets or sets the format specifiers to use with the labels for the LegendOthersSlices.
        */
        get: function () {
            return this.i.agl;
        },
        set: function (v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                var re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.agl = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "innerExtent", {
        /**
         * Defines the percentage of the maximum radius extent to leave blank at the center of the chart. Should be
         * a value between 0.0 and 1.0.
        */
        get: function () {
            return this.i.aht;
        },
        set: function (v) {
            this.i.aht = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sweepDirection", {
        /**
         * Defines the percentage of the maximum radius extent to leave blank at the center of the chart. Should be
         * a value between 0.0 and 1.0.
        */
        get: function () {
            return this.i.ag0;
        },
        set: function (v) {
            this.i.ag0 = ensureEnum(PieChartSweepDirection_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sliceLabelPositionMode", {
        /**
         * Defines the positioning mode of the slice labels for the pie chart.
        */
        get: function () {
            return this.i.ags;
        },
        set: function (v) {
            this.i.ags = ensureEnum(CalloutCollisionMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "lightSliceLabelColor", {
        /**
         * Gets or sets the light color to use for slice labels.
        */
        get: function () {
            return brushToString(this.i.ajz);
        },
        set: function (v) {
            this.i.ajz = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "darkSliceLabelColor", {
        /**
         * Gets or sets the Dark color to use for slice labels.
        */
        get: function () {
            return brushToString(this.i.ajy);
        },
        set: function (v) {
            this.i.ajy = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueMemberPath", {
        /**
         * Gets or sets the overridden value member path to use.
        */
        get: function () {
            return this.i.ajn;
        },
        set: function (v) {
            this.i.ajn = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendLabelMemberPath", {
        /**
         * Gets or sets the legend label member path to use.
        */
        get: function () {
            return this.i.ail;
        },
        set: function (v) {
            this.i.ail = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "othersCategoryType", {
        /**
         * Gets or sets whether to use numeric or percent-based threshold value.
        */
        get: function () {
            return this.i.agy;
        },
        set: function (v) {
            this.i.agy = ensureEnum(OthersCategoryType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "othersCategoryThreshold", {
        /**
         * Gets or sets the threshold value that determines if slices are grouped into the Others slice.
        */
        get: function () {
            return this.i.ahu;
        },
        set: function (v) {
            this.i.ahu = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "othersCategoryText", {
        /**
         * Gets or sets the label of the Others slice.
        */
        get: function () {
            return this.i.aiw;
        },
        set: function (v) {
            this.i.aiw = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "labelMemberPath", {
        /**
         * Gets or sets the overridden value member path to use.
        */
        get: function () {
            return this.i.aij;
        },
        set: function (v) {
            this.i.aij = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisFavorLabellingScaleEnd", {
        /**
         * Gets or sets whether the axis should favor emitting a label at the end of the scale.
        */
        get: function () {
            return this.i.ahf;
        },
        set: function (v) {
            this.i.ahf = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisAutoRangeBufferMode", {
        /**
         * Gets or sets how the numeric axis will adjust its range buffer to less closely fix the data from the series.
        */
        get: function () {
            return this.i.agq;
        },
        set: function (v) {
            this.i.agq = ensureEnum(AxisRangeBufferMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "angleAxisInterval", {
        /**
         * Gets or sets the frequency of displayed labels along the X-axis.
         * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label.
        */
        get: function () {
            return this.i.ahr;
        },
        set: function (v) {
            this.i.ahr = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "angleAxisMinorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines along the X-axis.
         * Gets or sets the set value is a factor that determines how the minor lines will be displayed.
        */
        get: function () {
            return this.i.ahs;
        },
        set: function (v) {
            this.i.ahs = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisInterval", {
        /**
         * Gets or sets the distance between each label and grid line along the Y-axis.
        */
        get: function () {
            return this.i.ahz;
        },
        set: function (v) {
            this.i.ahz = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisIsLogarithmic", {
        /**
         * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one.
         * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero.
        */
        get: function () {
            return this.i.ahg;
        },
        set: function (v) {
            this.i.ahg = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisLogarithmBase", {
        /**
         * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis.
         * This property is effective only when ValueAxisIsLogarithmic is true.
        */
        get: function () {
            return this.i.ah4;
        },
        set: function (v) {
            this.i.ah4 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisMinimumValue", {
        /**
         * Gets or sets the data value corresponding to the minimum value of the Y-axis.
        */
        get: function () {
            return this.i.ah1;
        },
        set: function (v) {
            this.i.ah1 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisMaximumValue", {
        /**
         * Gets or sets the data value corresponding to the maximum value of the Y-axis.
        */
        get: function () {
            return this.i.ah0;
        },
        set: function (v) {
            this.i.ah0 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisMinorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines along the Y-axis.
        */
        get: function () {
            return this.i.ah2;
        },
        set: function (v) {
            this.i.ah2 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisActualMinimum", {
        /**
         * Gets the current minimum value for the Y-axis.
        */
        get: function () {
            return this.i.ahy;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisActualMaximum", {
        /**
         * Gets the current maximum value for the Y-axis.
        */
        get: function () {
            return this.i.ahx;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "radiusExtent", {
        /**
         * Gets or sets the extent of the chart's radius. Value between 0 and 1.
        */
        get: function () {
            return this.i.ahv;
        },
        set: function (v) {
            this.i.ahv = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "startAngle", {
        /**
         * Gets or sets the start angle to use for the pie chart measured in degrees from the positive x axis.
        */
        get: function () {
            return this.i.ahw;
        },
        set: function (v) {
            this.i.ahw = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sliceLabelContentSeparator", {
        /**
         * Gets or sets the label of the Others slice.
        */
        get: function () {
            return this.i.ai5;
        },
        set: function (v) {
            this.i.ai5 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "sliceLabelContentMode", {
        /**
         * Gets or sets the label of the Others slice.
        */
        get: function () {
            return this.i.ag6;
        },
        set: function (v) {
            this.i.ag6 = ensureEnum(RadialLabelMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "legendSliceLabelContentMode", {
        /**
         * Gets or sets the label of the Others slice.
        */
        get: function () {
            return this.i.ag5;
        },
        set: function (v) {
            this.i.ag5 = ensureEnum(RadialLabelMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "angleAxisFavorLabellingScaleEnd", {
        /**
         * Gets or sets whether to favor labelling the end of the scale.
        */
        get: function () {
            return this.i.ahc;
        },
        set: function (v) {
            this.i.ahc = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "valueAxisAbbreviateLargeNumbers", {
        /**
         * Gets or sets whether the large numbers on the Y-axis labels are abbreviated.
        */
        get: function () {
            return this.i.ahe;
        },
        set: function (v) {
            this.i.ahe = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrDataPieBaseChart.prototype, "markerCollision", {
        /**
         * Gets or sets collision avoidance between markers on series that support this behaviour.
        */
        get: function () {
            return this.i.agu;
        },
        set: function (v) {
            this.i.agu = ensureEnum(CollisionAvoidanceType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    IgrDataPieBaseChart.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.sliceLabelFormatSpecifiers != null && arrayFindByName(this.sliceLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.sliceLabelFormatSpecifiers, name);
        }
        if (this.legendSliceLabelFormatSpecifiers != null && arrayFindByName(this.legendSliceLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.legendSliceLabelFormatSpecifiers, name);
        }
        if (this.othersSliceLabelFormatSpecifiers != null && arrayFindByName(this.othersSliceLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.othersSliceLabelFormatSpecifiers, name);
        }
        if (this.legendOthersSliceLabelFormatSpecifiers != null && arrayFindByName(this.legendOthersSliceLabelFormatSpecifiers, name)) {
            return arrayFindByName(this.legendOthersSliceLabelFormatSpecifiers, name);
        }
        return null;
    };
    return IgrDataPieBaseChart;
}(IgrRadialBaseChart));
export { IgrDataPieBaseChart };
