import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-react-core";
import { LegendEmptyValuesMode_$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
*/
export class IgrDataPieBaseChart extends IgrRadialBaseChart {
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the label format for the slices.
    */
    get sliceLabelFormat() {
        return this.i.ajp;
    }
    set sliceLabelFormat(v) {
        this.i.ajp = v;
    }
    /**
     * Gets or sets the format specifiers to use with the labels for the slices.
    */
    get sliceLabelFormatSpecifiers() {
        return this.i.ag3;
    }
    set sliceLabelFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.ag3 = v;
    }
    /**
     * Gets or sets the label format for the LegendSlices.
    */
    get legendSliceLabelFormat() {
        return this.i.ai9;
    }
    set legendSliceLabelFormat(v) {
        this.i.ai9 = v;
    }
    /**
     * Gets or sets the format specifiers to use with the labels for the LegendSlices.
    */
    get legendSliceLabelFormatSpecifiers() {
        return this.i.ag1;
    }
    set legendSliceLabelFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.ag1 = v;
    }
    /**
     * Gets or sets the label format for the OthersSlices.
    */
    get othersSliceLabelFormat() {
        return this.i.aji;
    }
    set othersSliceLabelFormat(v) {
        this.i.aji = v;
    }
    /**
     * Gets or sets the format specifiers to use with the labels for the OthersSlices.
    */
    get othersSliceLabelFormatSpecifiers() {
        return this.i.ag2;
    }
    set othersSliceLabelFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.ag2 = v;
    }
    /**
     * Gets or sets the label format for the LegendOthersSlices.
    */
    get legendOthersSliceLabelFormat() {
        return this.i.ai5;
    }
    set legendOthersSliceLabelFormat(v) {
        this.i.ai5 = v;
    }
    /**
     * Gets or sets the format specifiers to use with the labels for the LegendOthersSlices.
    */
    get legendOthersSliceLabelFormatSpecifiers() {
        return this.i.ag0;
    }
    set legendOthersSliceLabelFormatSpecifiers(v) {
        if (v && !Array.isArray(v) && typeof (v) == "string") {
            const re = /\s*(?:,|\s|$)\s*/gm;
            v = v.split(re);
        }
        this.i.ag0 = v;
    }
    /**
     * 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 innerExtent() {
        return this.i.aia;
    }
    set innerExtent(v) {
        this.i.aia = +v;
    }
    /**
     * 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 sweepDirection() {
        return this.i.ahh;
    }
    set sweepDirection(v) {
        this.i.ahh = ensureEnum(PieChartSweepDirection_$type, v);
    }
    /**
     * Defines the positioning mode of the slice labels for the pie chart.
    */
    get sliceLabelPositionMode() {
        return this.i.ag7;
    }
    set sliceLabelPositionMode(v) {
        this.i.ag7 = ensureEnum(CalloutCollisionMode_$type, v);
    }
    /**
     * Gets or sets the light color to use for slice labels.
    */
    get lightSliceLabelColor() {
        return brushToString(this.i.akh);
    }
    set lightSliceLabelColor(v) {
        this.i.akh = stringToBrush(v);
    }
    /**
     * Gets or sets the Dark color to use for slice labels.
    */
    get darkSliceLabelColor() {
        return brushToString(this.i.akg);
    }
    set darkSliceLabelColor(v) {
        this.i.akg = stringToBrush(v);
    }
    /**
     * Gets or sets the overridden value member path to use.
    */
    get valueMemberPath() {
        return this.i.aj5;
    }
    set valueMemberPath(v) {
        this.i.aj5 = v;
    }
    /**
     * Gets or sets the legend label member path to use.
    */
    get legendLabelMemberPath() {
        return this.i.ai3;
    }
    set legendLabelMemberPath(v) {
        this.i.ai3 = v;
    }
    get legendEmptyValuesMode() {
        return this.i.ahb;
    }
    set legendEmptyValuesMode(v) {
        this.i.ahb = ensureEnum(LegendEmptyValuesMode_$type, v);
    }
    /**
     * Gets or sets whether to use numeric or percent-based threshold value.
    */
    get othersCategoryType() {
        return this.i.ahf;
    }
    set othersCategoryType(v) {
        this.i.ahf = ensureEnum(OthersCategoryType_$type, v);
    }
    /**
     * Gets or sets the threshold value that determines if slices are grouped into the Others slice.
    */
    get othersCategoryThreshold() {
        return this.i.aib;
    }
    set othersCategoryThreshold(v) {
        this.i.aib = +v;
    }
    /**
     * Gets or sets the label of the Others slice.
    */
    get othersCategoryText() {
        return this.i.aje;
    }
    set othersCategoryText(v) {
        this.i.aje = v;
    }
    /**
     * Gets or sets the overridden value member path to use.
    */
    get labelMemberPath() {
        return this.i.ai0;
    }
    set labelMemberPath(v) {
        this.i.ai0 = v;
    }
    /**
     * Gets or sets whether the axis should favor emitting a label at the end of the scale.
    */
    get valueAxisFavorLabellingScaleEnd() {
        return this.i.ahw;
    }
    set valueAxisFavorLabellingScaleEnd(v) {
        this.i.ahw = ensureBool(v);
    }
    /**
     * Gets or sets how the numeric axis will adjust its range buffer to less closely fix the data from the series.
    */
    get valueAxisAutoRangeBufferMode() {
        return this.i.ag5;
    }
    set valueAxisAutoRangeBufferMode(v) {
        this.i.ag5 = ensureEnum(AxisRangeBufferMode_$type, v);
    }
    /**
     * 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 angleAxisInterval() {
        return this.i.ah8;
    }
    set angleAxisInterval(v) {
        this.i.ah8 = +v;
    }
    /**
     * 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 angleAxisMinorInterval() {
        return this.i.ah9;
    }
    set angleAxisMinorInterval(v) {
        this.i.ah9 = +v;
    }
    /**
     * Gets or sets the distance between each label and grid line along the Y-axis.
    */
    get valueAxisInterval() {
        return this.i.aig;
    }
    set valueAxisInterval(v) {
        this.i.aig = +v;
    }
    /**
     * 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 valueAxisIsLogarithmic() {
        return this.i.ahx;
    }
    set valueAxisIsLogarithmic(v) {
        this.i.ahx = ensureBool(v);
    }
    /**
     * 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 valueAxisLogarithmBase() {
        return this.i.ail;
    }
    set valueAxisLogarithmBase(v) {
        this.i.ail = +v;
    }
    /**
     * Gets or sets the data value corresponding to the minimum value of the Y-axis.
    */
    get valueAxisMinimumValue() {
        return this.i.aii;
    }
    set valueAxisMinimumValue(v) {
        this.i.aii = +v;
    }
    /**
     * Gets or sets the data value corresponding to the maximum value of the Y-axis.
    */
    get valueAxisMaximumValue() {
        return this.i.aih;
    }
    set valueAxisMaximumValue(v) {
        this.i.aih = +v;
    }
    /**
     * Gets or sets the frequency of displayed minor lines along the Y-axis.
    */
    get valueAxisMinorInterval() {
        return this.i.aij;
    }
    set valueAxisMinorInterval(v) {
        this.i.aij = +v;
    }
    /**
     * Gets the current minimum value for the Y-axis.
    */
    get valueAxisActualMinimum() {
        return this.i.aif;
    }
    /**
     * Gets the current maximum value for the Y-axis.
    */
    get valueAxisActualMaximum() {
        return this.i.aie;
    }
    /**
     * Gets or sets the extent of the chart's radius. Value between 0 and 1.
    */
    get radiusExtent() {
        return this.i.aic;
    }
    set radiusExtent(v) {
        this.i.aic = +v;
    }
    /**
     * Gets or sets the start angle to use for the pie chart measured in degrees from the positive x axis.
    */
    get startAngle() {
        return this.i.aid;
    }
    set startAngle(v) {
        this.i.aid = +v;
    }
    /**
     * Gets or sets the label of the Others slice.
    */
    get sliceLabelContentSeparator() {
        return this.i.ajn;
    }
    set sliceLabelContentSeparator(v) {
        this.i.ajn = v;
    }
    /**
     * Gets or sets the label of the Others slice.
    */
    get sliceLabelContentMode() {
        return this.i.ahn;
    }
    set sliceLabelContentMode(v) {
        this.i.ahn = ensureEnum(RadialLabelMode_$type, v);
    }
    /**
     * Gets or sets the label of the Others slice.
    */
    get legendSliceLabelContentMode() {
        return this.i.ahm;
    }
    set legendSliceLabelContentMode(v) {
        this.i.ahm = ensureEnum(RadialLabelMode_$type, v);
    }
    /**
     * Gets or sets whether to favor labelling the end of the scale.
    */
    get angleAxisFavorLabellingScaleEnd() {
        return this.i.aht;
    }
    set angleAxisFavorLabellingScaleEnd(v) {
        this.i.aht = ensureBool(v);
    }
    /**
     * Gets or sets whether the large numbers on the Y-axis labels are abbreviated.
    */
    get valueAxisAbbreviateLargeNumbers() {
        return this.i.ahv;
    }
    set valueAxisAbbreviateLargeNumbers(v) {
        this.i.ahv = ensureBool(v);
    }
    /**
     * Gets or sets collision avoidance between markers on series that support this behaviour.
    */
    get markerCollision() {
        return this.i.ag9;
    }
    set markerCollision(v) {
        this.i.ag9 = ensureEnum(CollisionAvoidanceType_$type, v);
    }
    findByName(name) {
        var baseResult = super.findByName(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;
    }
}
