import { EventEmitter, Output, Component, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxNumericAngleAxisComponent } from "./igx-numeric-angle-axis-component";
import { IgxNumericRadiusAxisComponent } from "./igx-numeric-radius-axis-component";
import { TrendLineType_$type } from "igniteui-angular-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { IgxAssigningPolarStyleEventArgs } from "./igx-assigning-polar-style-event-args";
import { IgxAssigningPolarMarkerStyleEventArgs } from "./igx-assigning-polar-marker-style-event-args";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toPoint, fromPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents the base class from which all IgxDataChartComponent polar series are derived.
*/
export let IgxPolarBaseComponent = /*@__PURE__*/ (() => {
    class IgxPolarBaseComponent extends IgxMarkerSeriesComponent {
        constructor() {
            super();
            this._assigningPolarStyle = null;
            this._assigningPolarMarkerStyle = null;
        }
        /**
                                     * @hidden
                                     */
        get i() {
            return this._implementation;
        }
        /**
         * Checks if this series is a polar series
        */
        get isPolar() {
            return this.i.df;
        }
        /**
         * Gets or sets the path to use to find the angle values for the series.
        */
        get angleMemberPath() {
            return this.i.rf;
        }
        set angleMemberPath(v) {
            this.i.rf = v;
        }
        /**
         * Gets or sets the path to use to get the radius values for the series.
        */
        get radiusMemberPath() {
            return this.i.rp;
        }
        set radiusMemberPath(v) {
            this.i.rp = v;
        }
        /**
         * Gets the effective angle axis for the current series object.
        */
        get angleAxis() {
            if (this.i.p0 == null) {
                return null;
            }
            if (!this.i.p0.externalObject) {
                let e = IgxNumericAngleAxisComponent._createFromInternal(this.i.p0);
                if (e) {
                    e._implementation = this.i.p0;
                }
                this.i.p0.externalObject = e;
            }
            return this.i.p0.externalObject;
        }
        set angleAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.p0 = null : this.i.p0 = v.i;
        }
        /**
         * Gets the effective radius axis for the current series object.
        */
        get radiusAxis() {
            if (this.i.p1 == null) {
                return null;
            }
            if (!this.i.p1.externalObject) {
                let e = IgxNumericRadiusAxisComponent._createFromInternal(this.i.p1);
                if (e) {
                    e._implementation = this.i.p1;
                }
                this.i.p1.externalObject = e;
            }
            return this.i.p1.externalObject;
        }
        set radiusAxis(v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.p1 = null : this.i.p1 = v.i;
        }
        /**
         * Gets or sets whether Cartesian Interpolation should be used rather than Archimedian
         * spiral based interpolation.
        */
        get useCartesianInterpolation() {
            return this.i.qz;
        }
        set useCartesianInterpolation(v) {
            this.i.qz = ensureBool(v);
        }
        /**
         * Gets or sets the maximum number of markers displayed by the current series.
         * If more than the specified number of markers are visible, the polar series will automatically
         * choose a representative set.
        */
        get maximumMarkers() {
            return this.i.q9;
        }
        set maximumMarkers(v) {
            this.i.q9 = +v;
        }
        /**
         * Gets or sets the trend type for the current series object.
        */
        get trendLineType() {
            return this.i.qh;
        }
        set trendLineType(v) {
            this.i.qh = ensureEnum(TrendLineType_$type, v);
        }
        /**
         * Gets or sets the brush that specifies how the current series
         * object's trend line is drawn.
        */
        get trendLineBrush() {
            return brushToString(this.i.so);
        }
        set trendLineBrush(v) {
            this.i.so = stringToBrush(v);
        }
        /**
         * Gets the effective TrendLineBrush for this series.
        */
        get actualTrendLineBrush() {
            return brushToString(this.i.sn);
        }
        set actualTrendLineBrush(v) {
            this.i.sn = stringToBrush(v);
        }
        /**
         * Gets or sets the thickness of the current series object's trend line.
        */
        get trendLineThickness() {
            return this.i.q7;
        }
        set trendLineThickness(v) {
            this.i.q7 = +v;
        }
        /**
         * Gets or sets the moving average period for the current series object.
        */
        get trendLinePeriod() {
            return this.i.ra;
        }
        set trendLinePeriod(v) {
            this.i.ra = +v;
        }
        /**
         * Sets or Gets the Trendline Z index.
        */
        get trendLineZIndex() {
            return this.i.rb;
        }
        set trendLineZIndex(v) {
            this.i.rb = +v;
        }
        /**
         * Gets or sets whether to clip the series to the bounds.
         * Setting this to true can effect performance.
        */
        get clipSeriesToBounds() {
            return this.i.qq;
        }
        set clipSeriesToBounds(v) {
            this.i.qq = ensureBool(v);
        }
        get actualItemSearchMode() {
            return this.i.qd;
        }
        set actualItemSearchMode(v) {
            this.i.qd = ensureEnum(ScatterItemSearchMode_$type, v);
        }
        /**
         * Gets or sets the mode the series will use to find the closest point to the cursor.
        */
        get itemSearchMode() {
            return this.i.qf;
        }
        set itemSearchMode(v) {
            this.i.qf = ensureEnum(ScatterItemSearchMode_$type, v);
        }
        /**
         * Gets or sets the threshold to use when searching for items using ItemSearchMode.
        */
        get itemSearchThreshold() {
            return this.i.q8;
        }
        set itemSearchThreshold(v) {
            this.i.q8 = +v;
        }
        /**
         * Gets or sets whether this Polar series should allow custom style overrides of its individual visuals.
        */
        get isCustomPolarStyleAllowed() {
            return this.i.qt;
        }
        set isCustomPolarStyleAllowed(v) {
            this.i.qt = ensureBool(v);
        }
        /**
         * Gets or sets whether this Polar series should allow custom style overrides of its individual marker visuals.
        */
        get isCustomPolarMarkerStyleAllowed() {
            return this.i.qs;
        }
        set isCustomPolarMarkerStyleAllowed(v) {
            this.i.qs = ensureBool(v);
        }
        findByName(name) {
            var baseResult = super.findByName(name);
            if (baseResult) {
                return baseResult;
            }
            if (this.angleAxis && this.angleAxis.name && this.angleAxis.name == name) {
                return this.angleAxis;
            }
            if (this.radiusAxis && this.radiusAxis.name && this.radiusAxis.name == name) {
                return this.radiusAxis;
            }
            return null;
        }
        _styling(container, component, parent) {
            super._styling(container, component, parent);
            this._inStyling = true;
            if (this.angleAxis && this.angleAxis._styling) {
                this.angleAxis._styling(container, component, this);
            }
            if (this.radiusAxis && this.radiusAxis._styling) {
                this.radiusAxis._styling(container, component, this);
            }
            this._inStyling = false;
        }
        /**
         * Scrolls the requested item into view, if possible.
        
        * @param item  * The item to scroll into view.
        */
        scrollIntoView(item) {
            let iv = this.i.dq(item);
            return (iv);
        }
        /**
         * Gets the item that is the best match for the specified world coordinates.
        
        * @param world  * The world coordinates to use.
        */
        getItem(world) {
            let iv = this.i.gq(toPoint(world));
            return (iv);
        }
        /**
         * Gets the index of the item that resides at the provided world coordinates.
        
        * @param world  * The world coordinates of the requested item.
        */
        getItemIndex(world) {
            let iv = this.i.f9(toPoint(world));
            return (iv);
        }
        getExactItemIndex(world) {
            let iv = this.i.e4(toPoint(world));
            return (iv);
        }
        getSeriesValuePosition(world, useInterpolation, skipUnknowns) {
            let iv = this.i.nt(toPoint(world), useInterpolation, skipUnknowns);
            return fromPoint(iv);
        }
        getItemValue(item, memberPathName) {
            let iv = this.i.gt(item, memberPathName);
            return (iv);
        }
        /**
         * Determine if object can be used as RadiusAxis
        
        * @param axis  * The object to check
        */
        canUseAsRadiusAxis(axis) {
            let iv = this.i.qp(axis);
            return (iv);
        }
        /**
         * Determine if object can be used as AngleAxis
        
        * @param axis  * The object to check
        */
        canUseAsAngleAxis(axis) {
            let iv = this.i.qo(axis);
            return (iv);
        }
        /**
         * Event raised when Assigning Category Style
        */
        get assigningPolarStyle() {
            if (this._assigningPolarStyle == null) {
                this._assigningPolarStyle = new EventEmitter();
                this.i.assigningPolarStyle = delegateCombine(this.i.assigningPolarStyle, (o, e) => {
                    let outerArgs = new IgxAssigningPolarStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeAssigningPolarStyle) {
                        this.beforeAssigningPolarStyle(this, outerArgs);
                    }
                    this._assigningPolarStyle.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningPolarStyle;
        }
        /**
         * Event raised when Assigning Polar Marker Style
        */
        get assigningPolarMarkerStyle() {
            if (this._assigningPolarMarkerStyle == null) {
                this._assigningPolarMarkerStyle = new EventEmitter();
                this.i.assigningPolarMarkerStyle = delegateCombine(this.i.assigningPolarMarkerStyle, (o, e) => {
                    let outerArgs = new IgxAssigningPolarMarkerStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeAssigningPolarMarkerStyle) {
                        this.beforeAssigningPolarMarkerStyle(this, outerArgs);
                    }
                    this._assigningPolarMarkerStyle.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningPolarMarkerStyle;
        }
    }
    IgxPolarBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxPolarBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxPolarBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: IgxPolarBaseComponent, selector: "ng-component", inputs: { angleMemberPath: "angleMemberPath", radiusMemberPath: "radiusMemberPath", angleAxis: "angleAxis", radiusAxis: "radiusAxis", useCartesianInterpolation: "useCartesianInterpolation", maximumMarkers: "maximumMarkers", trendLineType: "trendLineType", trendLineBrush: "trendLineBrush", actualTrendLineBrush: "actualTrendLineBrush", trendLineThickness: "trendLineThickness", trendLinePeriod: "trendLinePeriod", trendLineZIndex: "trendLineZIndex", clipSeriesToBounds: "clipSeriesToBounds", actualItemSearchMode: "actualItemSearchMode", itemSearchMode: "itemSearchMode", itemSearchThreshold: "itemSearchThreshold", isCustomPolarStyleAllowed: "isCustomPolarStyleAllowed", isCustomPolarMarkerStyleAllowed: "isCustomPolarMarkerStyleAllowed" }, outputs: { assigningPolarStyle: "assigningPolarStyle", assigningPolarMarkerStyle: "assigningPolarMarkerStyle" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
    return IgxPolarBaseComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: IgxPolarBaseComponent, decorators: [{
            type: Component,
            args: [{
                    template: ``,
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { angleMemberPath: [{
                type: Input
            }], radiusMemberPath: [{
                type: Input
            }], angleAxis: [{
                type: Input
            }], radiusAxis: [{
                type: Input
            }], useCartesianInterpolation: [{
                type: Input
            }], maximumMarkers: [{
                type: Input
            }], trendLineType: [{
                type: Input
            }], trendLineBrush: [{
                type: Input
            }], actualTrendLineBrush: [{
                type: Input
            }], trendLineThickness: [{
                type: Input
            }], trendLinePeriod: [{
                type: Input
            }], trendLineZIndex: [{
                type: Input
            }], clipSeriesToBounds: [{
                type: Input
            }], actualItemSearchMode: [{
                type: Input
            }], itemSearchMode: [{
                type: Input
            }], itemSearchThreshold: [{
                type: Input
            }], isCustomPolarStyleAllowed: [{
                type: Input
            }], isCustomPolarMarkerStyleAllowed: [{
                type: Input
            }], assigningPolarStyle: [{
                type: Output
            }], assigningPolarMarkerStyle: [{
                type: Output
            }] } });
//# sourceMappingURL=igx-polar-base-component.js.map
