import { Component, Input } from '@angular/core';
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-angular-core";
import { LegendEmptyValuesMode_$type } from "igniteui-angular-core";
import { OthersCategoryType_$type } from "igniteui-angular-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-angular-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { IgxOthersCategoryContextComponent } from "./igx-others-category-context-component";
import { IgxRadialBaseChartComponent } from "./igx-radial-base-chart-component";
import { ensureEnum, brushToString, stringToBrush, ensureBool, arrayFindByName } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents a base class for PieBase chart control that can plot scatter data
*/
export let IgxDataPieBaseChartComponent = /*@__PURE__*/ (() => {
    class IgxDataPieBaseChartComponent extends IgxRadialBaseChartComponent {
        constructor() {
            super();
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Gets or sets the label format for the slices.
        */
        get sliceLabelFormat() {
            return this.i.alg;
        }
        set sliceLabelFormat(v) {
            this.i.alg = v;
        }
        /**
         * Gets or sets the format specifiers to use with the labels for the slices.
        */
        get sliceLabelFormatSpecifiers() {
            return this.i.aif;
        }
        set sliceLabelFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.aif = v;
        }
        /**
         * Gets or sets the label format for the LegendSlices.
        */
        get legendSliceLabelFormat() {
            return this.i.akx;
        }
        set legendSliceLabelFormat(v) {
            this.i.akx = v;
        }
        /**
         * Gets or sets the format specifiers to use with the labels for the LegendSlices.
        */
        get legendSliceLabelFormatSpecifiers() {
            return this.i.aid;
        }
        set legendSliceLabelFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.aid = v;
        }
        /**
         * Gets or sets the label format for the OthersSlices.
        */
        get othersSliceLabelFormat() {
            return this.i.ak6;
        }
        set othersSliceLabelFormat(v) {
            this.i.ak6 = v;
        }
        /**
         * Gets or sets the format specifiers to use with the labels for the OthersSlices.
        */
        get othersSliceLabelFormatSpecifiers() {
            return this.i.aie;
        }
        set othersSliceLabelFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.aie = v;
        }
        /**
         * Gets or sets the label format for the LegendOthersSlices.
        */
        get legendOthersSliceLabelFormat() {
            return this.i.akt;
        }
        set legendOthersSliceLabelFormat(v) {
            this.i.akt = v;
        }
        /**
         * Gets or sets the format specifiers to use with the labels for the LegendOthersSlices.
        */
        get legendOthersSliceLabelFormatSpecifiers() {
            return this.i.aic;
        }
        set legendOthersSliceLabelFormatSpecifiers(v) {
            if (v && !Array.isArray(v) && typeof (v) == "string") {
                const re = /\s*(?:,|\s|$)\s*/gm;
                v = v.split(re);
            }
            this.i.aic = 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.aju;
        }
        set innerExtent(v) {
            this.i.aju = +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.aiu;
        }
        set sweepDirection(v) {
            this.i.aiu = ensureEnum(PieChartSweepDirection_$type, v);
        }
        /**
         * Defines the positioning mode of the slice labels for the pie chart.
        */
        get sliceLabelPositionMode() {
            return this.i.aij;
        }
        set sliceLabelPositionMode(v) {
            this.i.aij = ensureEnum(CalloutCollisionMode_$type, v);
        }
        /**
         * Gets or sets the light color to use for slice labels.
        */
        get lightSliceLabelColor() {
            return brushToString(this.i.al9);
        }
        set lightSliceLabelColor(v) {
            this.i.al9 = stringToBrush(v);
        }
        /**
         * Gets or sets the Dark color to use for slice labels.
        */
        get darkSliceLabelColor() {
            return brushToString(this.i.al8);
        }
        set darkSliceLabelColor(v) {
            this.i.al8 = stringToBrush(v);
        }
        /**
         * Gets or sets the overridden value member path to use.
        */
        get valueMemberPath() {
            return this.i.alx;
        }
        set valueMemberPath(v) {
            this.i.alx = v;
        }
        /**
         * Gets or sets the legend label member path to use.
        */
        get legendLabelMemberPath() {
            return this.i.akr;
        }
        set legendLabelMemberPath(v) {
            this.i.akr = v;
        }
        get legendEmptyValuesMode() {
            return this.i.ain;
        }
        set legendEmptyValuesMode(v) {
            this.i.ain = ensureEnum(LegendEmptyValuesMode_$type, v);
        }
        /**
         * Gets or sets whether to use numeric or percent-based threshold value.
        */
        get othersCategoryType() {
            return this.i.ais;
        }
        set othersCategoryType(v) {
            this.i.ais = 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.ajv;
        }
        set othersCategoryThreshold(v) {
            this.i.ajv = +v;
        }
        /**
         * Gets or sets the label of the Others slice.
        */
        get othersCategoryText() {
            return this.i.ak2;
        }
        set othersCategoryText(v) {
            this.i.ak2 = v;
        }
        /**
         * Gets or sets the overridden value member path to use.
        */
        get labelMemberPath() {
            return this.i.ako;
        }
        set labelMemberPath(v) {
            this.i.ako = v;
        }
        /**
         * Gets or sets whether the axis should favor emitting a label at the end of the scale.
        */
        get valueAxisFavorLabellingScaleEnd() {
            return this.i.ajd;
        }
        set valueAxisFavorLabellingScaleEnd(v) {
            this.i.ajd = 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.aih;
        }
        set valueAxisAutoRangeBufferMode(v) {
            this.i.aih = 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.ajs;
        }
        set angleAxisInterval(v) {
            this.i.ajs = +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.ajt;
        }
        set angleAxisMinorInterval(v) {
            this.i.ajt = +v;
        }
        /**
         * Gets or sets the distance between each label and grid line along the Y-axis.
        */
        get valueAxisInterval() {
            return this.i.aj3;
        }
        set valueAxisInterval(v) {
            this.i.aj3 = +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.aje;
        }
        set valueAxisIsLogarithmic(v) {
            this.i.aje = 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.aj8;
        }
        set valueAxisLogarithmBase(v) {
            this.i.aj8 = +v;
        }
        /**
         * Gets or sets the data value corresponding to the minimum value of the Y-axis.
        */
        get valueAxisMinimumValue() {
            return this.i.aj5;
        }
        set valueAxisMinimumValue(v) {
            this.i.aj5 = +v;
        }
        /**
         * Gets or sets the data value corresponding to the maximum value of the Y-axis.
        */
        get valueAxisMaximumValue() {
            return this.i.aj4;
        }
        set valueAxisMaximumValue(v) {
            this.i.aj4 = +v;
        }
        /**
         * Gets or sets the frequency of displayed minor lines along the Y-axis.
        */
        get valueAxisMinorInterval() {
            return this.i.aj6;
        }
        set valueAxisMinorInterval(v) {
            this.i.aj6 = +v;
        }
        /**
         * Gets the current minimum value for the Y-axis.
        */
        get valueAxisActualMinimum() {
            return this.i.aj2;
        }
        /**
         * Gets the current maximum value for the Y-axis.
        */
        get valueAxisActualMaximum() {
            return this.i.aj1;
        }
        /**
         * Gets or sets the extent of the chart's radius. Value between 0 and 1.
        */
        get radiusExtent() {
            return this.i.ajw;
        }
        set radiusExtent(v) {
            this.i.ajw = +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.aj0;
        }
        set startAngle(v) {
            this.i.aj0 = +v;
        }
        /**
         * Gets or sets the label of the Others slice.
        */
        get sliceLabelContentSeparator() {
            return this.i.ale;
        }
        set sliceLabelContentSeparator(v) {
            this.i.ale = v;
        }
        /**
         * Gets or sets the label of the Others slice.
        */
        get sliceLabelContentMode() {
            return this.i.ai0;
        }
        set sliceLabelContentMode(v) {
            this.i.ai0 = ensureEnum(RadialLabelMode_$type, v);
        }
        /**
         * Gets or sets the label of the Others slice.
        */
        get legendSliceLabelContentMode() {
            return this.i.aiz;
        }
        set legendSliceLabelContentMode(v) {
            this.i.aiz = ensureEnum(RadialLabelMode_$type, v);
        }
        /**
         * Gets or sets the x-radius of the ellipse that is used to round the corners of the slice.
        */
        get radiusX() {
            return this.i.ajx;
        }
        set radiusX(v) {
            this.i.ajx = +v;
        }
        /**
         * Gets or sets the y-radius of the ellipse that is used to round the corners of the slice.
        */
        get radiusY() {
            return this.i.ajy;
        }
        set radiusY(v) {
            this.i.ajy = +v;
        }
        /**
         * Gets or sets line thickness when the series is selected.
        */
        get selectionThickness() {
            return this.i.ajz;
        }
        set selectionThickness(v) {
            this.i.ajz = +v;
        }
        /**
         * Specifies that slice outlines should be drawn inside the slice rather than halfway
         * in and halfway out.
        */
        get useInsetOutlines() {
            return this.i.ajb;
        }
        set useInsetOutlines(v) {
            this.i.ajb = ensureBool(v);
        }
        /**
         * Gets or sets whether to favor labelling the end of the scale.
        */
        get angleAxisFavorLabellingScaleEnd() {
            return this.i.ai8;
        }
        set angleAxisFavorLabellingScaleEnd(v) {
            this.i.ai8 = ensureBool(v);
        }
        /**
         * Gets or sets whether the large numbers on the Y-axis labels are abbreviated.
        */
        get valueAxisAbbreviateLargeNumbers() {
            return this.i.ajc;
        }
        set valueAxisAbbreviateLargeNumbers(v) {
            this.i.ajc = ensureBool(v);
        }
        /**
         * Gets or sets collision avoidance between markers on series that support this behaviour.
        */
        get markerCollision() {
            return this.i.ail;
        }
        set markerCollision(v) {
            this.i.ail = ensureEnum(CollisionAvoidanceType_$type, v);
        }
        /**
         * Gets or sets whether the mouse leave event should fire when a manipulation is starting.
        */
        get fireMouseLeaveOnManipulationStart() {
            return this.i.ai9;
        }
        set fireMouseLeaveOnManipulationStart(v) {
            this.i.ai9 = ensureBool(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;
        }
        /**
         * Gets the Others context which provides a current list of items in Others slice.
        
        */
        getOthersContext() {
            let iv = this.i.aiq();
            let ret = null;
            if (iv && iv.externalObject) {
                ret = iv.externalObject;
            }
            else {
                if (iv) {
                    let e = IgxOthersCategoryContextComponent._createFromInternal(iv);
                    e._implementation = iv;
                    iv.externalObject = e;
                    ret = e;
                }
            }
            return ret;
        }
    }
    IgxDataPieBaseChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxDataPieBaseChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxDataPieBaseChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxDataPieBaseChartComponent, selector: "ng-component", inputs: { sliceLabelFormat: "sliceLabelFormat", sliceLabelFormatSpecifiers: "sliceLabelFormatSpecifiers", legendSliceLabelFormat: "legendSliceLabelFormat", legendSliceLabelFormatSpecifiers: "legendSliceLabelFormatSpecifiers", othersSliceLabelFormat: "othersSliceLabelFormat", othersSliceLabelFormatSpecifiers: "othersSliceLabelFormatSpecifiers", legendOthersSliceLabelFormat: "legendOthersSliceLabelFormat", legendOthersSliceLabelFormatSpecifiers: "legendOthersSliceLabelFormatSpecifiers", innerExtent: "innerExtent", sweepDirection: "sweepDirection", sliceLabelPositionMode: "sliceLabelPositionMode", lightSliceLabelColor: "lightSliceLabelColor", darkSliceLabelColor: "darkSliceLabelColor", valueMemberPath: "valueMemberPath", legendLabelMemberPath: "legendLabelMemberPath", legendEmptyValuesMode: "legendEmptyValuesMode", othersCategoryType: "othersCategoryType", othersCategoryThreshold: "othersCategoryThreshold", othersCategoryText: "othersCategoryText", labelMemberPath: "labelMemberPath", valueAxisFavorLabellingScaleEnd: "valueAxisFavorLabellingScaleEnd", valueAxisAutoRangeBufferMode: "valueAxisAutoRangeBufferMode", angleAxisInterval: "angleAxisInterval", angleAxisMinorInterval: "angleAxisMinorInterval", valueAxisInterval: "valueAxisInterval", valueAxisIsLogarithmic: "valueAxisIsLogarithmic", valueAxisLogarithmBase: "valueAxisLogarithmBase", valueAxisMinimumValue: "valueAxisMinimumValue", valueAxisMaximumValue: "valueAxisMaximumValue", valueAxisMinorInterval: "valueAxisMinorInterval", radiusExtent: "radiusExtent", startAngle: "startAngle", sliceLabelContentSeparator: "sliceLabelContentSeparator", sliceLabelContentMode: "sliceLabelContentMode", legendSliceLabelContentMode: "legendSliceLabelContentMode", radiusX: "radiusX", radiusY: "radiusY", selectionThickness: "selectionThickness", useInsetOutlines: "useInsetOutlines", angleAxisFavorLabellingScaleEnd: "angleAxisFavorLabellingScaleEnd", valueAxisAbbreviateLargeNumbers: "valueAxisAbbreviateLargeNumbers", markerCollision: "markerCollision", fireMouseLeaveOnManipulationStart: "fireMouseLeaveOnManipulationStart" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
    return IgxDataPieBaseChartComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxDataPieBaseChartComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { sliceLabelFormat: [{
                type: Input
            }], sliceLabelFormatSpecifiers: [{
                type: Input
            }], legendSliceLabelFormat: [{
                type: Input
            }], legendSliceLabelFormatSpecifiers: [{
                type: Input
            }], othersSliceLabelFormat: [{
                type: Input
            }], othersSliceLabelFormatSpecifiers: [{
                type: Input
            }], legendOthersSliceLabelFormat: [{
                type: Input
            }], legendOthersSliceLabelFormatSpecifiers: [{
                type: Input
            }], innerExtent: [{
                type: Input
            }], sweepDirection: [{
                type: Input
            }], sliceLabelPositionMode: [{
                type: Input
            }], lightSliceLabelColor: [{
                type: Input
            }], darkSliceLabelColor: [{
                type: Input
            }], valueMemberPath: [{
                type: Input
            }], legendLabelMemberPath: [{
                type: Input
            }], legendEmptyValuesMode: [{
                type: Input
            }], othersCategoryType: [{
                type: Input
            }], othersCategoryThreshold: [{
                type: Input
            }], othersCategoryText: [{
                type: Input
            }], labelMemberPath: [{
                type: Input
            }], valueAxisFavorLabellingScaleEnd: [{
                type: Input
            }], valueAxisAutoRangeBufferMode: [{
                type: Input
            }], angleAxisInterval: [{
                type: Input
            }], angleAxisMinorInterval: [{
                type: Input
            }], valueAxisInterval: [{
                type: Input
            }], valueAxisIsLogarithmic: [{
                type: Input
            }], valueAxisLogarithmBase: [{
                type: Input
            }], valueAxisMinimumValue: [{
                type: Input
            }], valueAxisMaximumValue: [{
                type: Input
            }], valueAxisMinorInterval: [{
                type: Input
            }], radiusExtent: [{
                type: Input
            }], startAngle: [{
                type: Input
            }], sliceLabelContentSeparator: [{
                type: Input
            }], sliceLabelContentMode: [{
                type: Input
            }], legendSliceLabelContentMode: [{
                type: Input
            }], radiusX: [{
                type: Input
            }], radiusY: [{
                type: Input
            }], selectionThickness: [{
                type: Input
            }], useInsetOutlines: [{
                type: Input
            }], angleAxisFavorLabellingScaleEnd: [{
                type: Input
            }], valueAxisAbbreviateLargeNumbers: [{
                type: Input
            }], markerCollision: [{
                type: Input
            }], fireMouseLeaveOnManipulationStart: [{
                type: Input
            }] } });
