import { __extends } from "tslib";
import { EventEmitter, Output, Component, Input } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component";
import { TrendLineType_$type } from "igniteui-angular-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { IgxAssigningScatterStyleEventArgs } from "./igx-assigning-scatter-style-event-args";
import { IgxAssigningScatterMarkerStyleEventArgs } from "./igx-assigning-scatter-marker-style-event-args";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { ensureBool, ensureEnum, brushToString, stringToBrush, toDoubleCollection, fromDoubleCollection, toPoint, fromRect, fromPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
 * Represents the base class for all IgxDataChartComponent scatter series
*/
var IgxScatterBaseComponent = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgxScatterBaseComponent, _super);
    function IgxScatterBaseComponent() {
        var _this = _super.call(this) || this;
        _this._assigningScatterStyle = null;
        _this._assigningScatterMarkerStyle = null;
        return _this;
    }
    Object.defineProperty(IgxScatterBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "isScatter", {
        /**
         * Checks if this series is a scatter series
        */
        get: function () {
            return this.i.fw;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get: function () {
            var r = this.i.xAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get: function () {
            var r = this.i.yAxis;
            if (r == null) {
                return null;
            }
            if (!r.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(r);
                if (e) {
                    e._implementation = r;
                }
                r.externalObject = e;
            }
            return r.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.aat;
        },
        set: function (v) {
            this.i.aat = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.aa1;
        },
        set: function (v) {
            this.i.aa1 = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "highlightedXMemberPath", {
        /**
         * Gets or sets the highlighted X value mapping property for the current series object.
        */
        get: function () {
            return this.i.aad;
        },
        set: function (v) {
            this.i.aad = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "highlightedYMemberPath", {
        /**
         * Gets or sets the highlighted Y value mapping property for the current series object.
        */
        get: function () {
            return this.i.aaf;
        },
        set: function (v) {
            this.i.aaf = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series X value in the Data Legend.
        */
        get: function () {
            return this.i.aap;
        },
        set: function (v) {
            this.i.aap = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yMemberAsLegendLabel", {
        /**
         * Gets or sets the label displayed before series Y value in the Data Legend.
        */
        get: function () {
            return this.i.aax;
        },
        set: function (v) {
            this.i.aax = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series X value in the Data Legend.
        */
        get: function () {
            return this.i.aar;
        },
        set: function (v) {
            this.i.aar = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yMemberAsLegendUnit", {
        /**
         * Gets or sets the unit after displayed after series Y value in the Data Legend.
        */
        get: function () {
            return this.i.aaz;
        },
        set: function (v) {
            this.i.aaz = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLineType", {
        /**
         * Gets or sets the trend type for the current scatter series.
        */
        get: function () {
            return this.i.trendLineType;
        },
        set: function (v) {
            this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLineBrush", {
        /**
         * Gets or sets the brush to use to draw the trend line.
        */
        get: function () {
            return brushToString(this.i.trendLineBrush);
        },
        set: function (v) {
            this.i.trendLineBrush = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this series.
        */
        get: function () {
            return brushToString(this.i.aci);
        },
        set: function (v) {
            this.i.aci = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the current scatter series object's trend line.
        */
        get: function () {
            return this.i.trendLineThickness;
        },
        set: function (v) {
            this.i.trendLineThickness = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLineDashArray", {
        /**
         * Gets or sets a collection of double values that indicate the pattern of dashes and gaps that
         * is used to draw the trend line for the current scatter series object.
        */
        get: function () {
            return fromDoubleCollection(this.i.acj);
        },
        set: function (v) {
            this.i.acj = toDoubleCollection(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the moving average period for the current scatter series object.
         * The typical, and initial, value for trend line period is 7.
        */
        get: function () {
            return this.i.trendLinePeriod;
        },
        set: function (v) {
            this.i.trendLinePeriod = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "markerCollisionAvoidance", {
        /**
         * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision.
        */
        get: function () {
            return this.i.yt;
        },
        set: function (v) {
            this.i.yt = ensureEnum(CollisionAvoidanceType_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "trendLineZIndex", {
        /**
         * Gets or sets the Z-Index of the trend line.  Values greater than 1000 will result in the trend line being rendered in front of the series data.
        */
        get: function () {
            return this.i.aaa;
        },
        set: function (v) {
            this.i.aaa = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "maximumMarkers", {
        /**
         * Gets or sets the maximum number of markerItems displayed by the current series.
         * If more than the specified number of markerItems are visible, the series will automatically
         * choose a representative set.
        */
        get: function () {
            return this.i.z9;
        },
        set: function (v) {
            this.i.z9 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "itemSearchMode", {
        /**
         * Gets or sets the mode the series will use to find the closest point to the cursor.
        */
        get: function () {
            return this.i.y8;
        },
        set: function (v) {
            this.i.y8 = ensureEnum(ScatterItemSearchMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "itemSearchThreshold", {
        /**
         * Gets or sets the threshold to use when searching for items using ItemSearchMode.
        */
        get: function () {
            return this.i.z8;
        },
        set: function (v) {
            this.i.z8 = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "actualItemSearchMode", {
        get: function () {
            return this.i.y6;
        },
        set: function (v) {
            this.i.y6 = ensureEnum(ScatterItemSearchMode_$type, v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "isCustomScatterStyleAllowed", {
        /**
         * Gets or sets whether this Scatter series should allow custom style overrides of its individual visuals.
        */
        get: function () {
            return this.i.zp;
        },
        set: function (v) {
            this.i.zp = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "isCustomScatterMarkerStyleAllowed", {
        /**
         * Gets or sets whether this Scatter series should allow custom style overrides of its individual marker visuals.
        */
        get: function () {
            return this.i.zo;
        },
        set: function (v) {
            this.i.zo = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    IgxScatterBaseComponent.prototype.findByName = function (name) {
        var baseResult = _super.prototype.findByName.call(this, name);
        if (baseResult) {
            return baseResult;
        }
        if (this.xAxis && this.xAxis.name && this.xAxis.name == name) {
            return this.xAxis;
        }
        if (this.yAxis && this.yAxis.name && this.yAxis.name == name) {
            return this.yAxis;
        }
        return null;
    };
    IgxScatterBaseComponent.prototype._styling = function (container, component, parent) {
        _super.prototype._styling.call(this, container, component, parent);
        this._inStyling = true;
        if (this.xAxis && this.xAxis._styling) {
            this.xAxis._styling(container, component, this);
        }
        if (this.yAxis && this.yAxis._styling) {
            this.yAxis._styling(container, component, this);
        }
        this._inStyling = false;
    };
    IgxScatterBaseComponent.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.kq(item, memberPathName);
        return (iv);
    };
    /**
     * Gets the value of a requested member path from the series.
    
    * @param memberPathName  * The property name of a valid member path for the series
    */
    IgxScatterBaseComponent.prototype.getMemberPathValue = function (memberPathName) {
        var iv = this.i.md(memberPathName);
        return (iv);
    };
    /**
     * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided.
    
    * @param world  * The world coordinates for which to get a value marker bounding box for
    */
    IgxScatterBaseComponent.prototype.getSeriesValueMarkerBoundingBox = function (world) {
        var iv = this.i.wp(toPoint(world));
        return fromRect(iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgxScatterBaseComponent.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.zn(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgxScatterBaseComponent.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.zm(axis);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgxScatterBaseComponent.prototype.getItem = function (world) {
        var iv = this.i.kn(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.
    */
    IgxScatterBaseComponent.prototype.getItemIndex = function (world) {
        var iv = this.i.j3(toPoint(world));
        return (iv);
    };
    IgxScatterBaseComponent.prototype.getExactItemIndex = function (world) {
        var iv = this.i.ir(toPoint(world));
        return (iv);
    };
    IgxScatterBaseComponent.prototype.getSeriesValuePosition = function (world, useInterpolation, skipUnknowns) {
        var iv = this.i.wc(toPoint(world), useInterpolation, skipUnknowns);
        return fromPoint(iv);
    };
    /**
     * Scrolls the series to display the item for the specified data item.
     * The series is scrolled by the minimum amount required to place the specified data item within
     * the central 80% of the visible axis.
    
    * @param item  * The data item (item) to scroll to.
    */
    IgxScatterBaseComponent.prototype.scrollIntoView = function (item) {
        var iv = this.i.gd(item);
        return (iv);
    };
    /**
     * Gets the numeric values from the X and Y axis associated with this scatter series that matches the desired
     * value mode.
    
    * @param mode  * The type of value desired from the series numeric axis.
    */
    IgxScatterBaseComponent.prototype.getSeriesValueType = function (mode) {
        var iv = this.i.aq((mode == null ? null : mode));
        return (iv);
    };
    IgxScatterBaseComponent.prototype.getSeriesValueTypePositionFromValue = function (values) {
        var iv = this.i.wg(values);
        return fromPoint(iv);
    };
    IgxScatterBaseComponent.prototype.getSeriesValueTypePosition = function (mode) {
        var iv = this.i.wf((mode == null ? null : mode));
        return fromPoint(iv);
    };
    Object.defineProperty(IgxScatterBaseComponent.prototype, "assigningScatterStyle", {
        /**
         * Event raised when Assigning Category Style
        */
        get: function () {
            var _this = this;
            if (this._assigningScatterStyle == null) {
                this._assigningScatterStyle = new EventEmitter();
                this.i.assigningScatterStyle = delegateCombine(this.i.assigningScatterStyle, function (o, e) {
                    var outerArgs = new IgxAssigningScatterStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeAssigningScatterStyle) {
                        _this.beforeAssigningScatterStyle(_this, outerArgs);
                    }
                    _this._assigningScatterStyle.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningScatterStyle;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "assigningScatterMarkerStyle", {
        /**
         * Event raised when Assigning Scatter Marker Style
        */
        get: function () {
            var _this = this;
            if (this._assigningScatterMarkerStyle == null) {
                this._assigningScatterMarkerStyle = new EventEmitter();
                this.i.assigningScatterMarkerStyle = delegateCombine(this.i.assigningScatterMarkerStyle, function (o, e) {
                    var outerArgs = new IgxAssigningScatterMarkerStyleEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeAssigningScatterMarkerStyle) {
                        _this.beforeAssigningScatterMarkerStyle(_this, outerArgs);
                    }
                    _this._assigningScatterMarkerStyle.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._assigningScatterMarkerStyle;
        },
        enumerable: false,
        configurable: true
    });
    IgxScatterBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    IgxScatterBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxScatterBaseComponent, selector: "ng-component", inputs: { xAxis: "xAxis", yAxis: "yAxis", xMemberPath: "xMemberPath", yMemberPath: "yMemberPath", highlightedXMemberPath: "highlightedXMemberPath", highlightedYMemberPath: "highlightedYMemberPath", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit", trendLineType: "trendLineType", trendLineBrush: "trendLineBrush", actualTrendLineBrush: "actualTrendLineBrush", trendLineThickness: "trendLineThickness", trendLineDashArray: "trendLineDashArray", trendLinePeriod: "trendLinePeriod", markerCollisionAvoidance: "markerCollisionAvoidance", trendLineZIndex: "trendLineZIndex", maximumMarkers: "maximumMarkers", itemSearchMode: "itemSearchMode", itemSearchThreshold: "itemSearchThreshold", actualItemSearchMode: "actualItemSearchMode", isCustomScatterStyleAllowed: "isCustomScatterStyleAllowed", isCustomScatterMarkerStyleAllowed: "isCustomScatterMarkerStyleAllowed" }, outputs: { assigningScatterStyle: "assigningScatterStyle", assigningScatterMarkerStyle: "assigningScatterMarkerStyle" }, usesInheritance: true, ngImport: i0, template: "", isInline: true });
    return IgxScatterBaseComponent;
}(IgxMarkerSeriesComponent));
export { IgxScatterBaseComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterBaseComponent, decorators: [{
            type: Component,
            args: [{
                    template: "",
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{
                type: Input
            }], yAxis: [{
                type: Input
            }], xMemberPath: [{
                type: Input
            }], yMemberPath: [{
                type: Input
            }], highlightedXMemberPath: [{
                type: Input
            }], highlightedYMemberPath: [{
                type: Input
            }], xMemberAsLegendLabel: [{
                type: Input
            }], yMemberAsLegendLabel: [{
                type: Input
            }], xMemberAsLegendUnit: [{
                type: Input
            }], yMemberAsLegendUnit: [{
                type: Input
            }], trendLineType: [{
                type: Input
            }], trendLineBrush: [{
                type: Input
            }], actualTrendLineBrush: [{
                type: Input
            }], trendLineThickness: [{
                type: Input
            }], trendLineDashArray: [{
                type: Input
            }], trendLinePeriod: [{
                type: Input
            }], markerCollisionAvoidance: [{
                type: Input
            }], trendLineZIndex: [{
                type: Input
            }], maximumMarkers: [{
                type: Input
            }], itemSearchMode: [{
                type: Input
            }], itemSearchThreshold: [{
                type: Input
            }], actualItemSearchMode: [{
                type: Input
            }], isCustomScatterStyleAllowed: [{
                type: Input
            }], isCustomScatterMarkerStyleAllowed: [{
                type: Input
            }], assigningScatterStyle: [{
                type: Output
            }], assigningScatterMarkerStyle: [{
                type: Output
            }] } });
