import * as tslib_1 from "tslib";
import { forwardRef, Input } from '@angular/core';
import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component";
import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component";
import { TrendLineType, TrendLineType_$type } from "igniteui-angular-core";
import { CollisionAvoidanceType, CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-angular-core";
/**
 * Represents the base class for all IgxDataChartComponent scatter series
*/
export var IgxScatterBaseComponent_PROVIDERS = [{ provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxScatterBaseComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterBaseComponent; }) }];
var IgxScatterBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxScatterBaseComponent, _super);
    function IgxScatterBaseComponent() {
        return _super.call(this) || this;
    }
    Object.defineProperty(IgxScatterBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "isScatter", {
        /**
         * Checks if this series is a scatter series
        */
        get: function () {
            return this.i.c4;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get: function () {
            if (this.i.xAxis == null) {
                return null;
            }
            if (!this.i.xAxis.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(this.i.xAxis);
                if (e) {
                    e._implementation = this.i.xAxis;
                }
                this.i.xAxis.externalObject = e;
            }
            return this.i.xAxis.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: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get: function () {
            if (this.i.yAxis == null) {
                return null;
            }
            if (!this.i.yAxis.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(this.i.yAxis);
                if (e) {
                    e._implementation = this.i.yAxis;
                }
                this.i.yAxis.externalObject = e;
            }
            return this.i.yAxis.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: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "xMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.nr;
        },
        set: function (v) {
            this.i.nr = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "yMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.nv;
        },
        set: function (v) {
            this.i.nv = v;
        },
        enumerable: true,
        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: true,
        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: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterBaseComponent.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this series.
        */
        get: function () {
            return brushToString(this.i.os);
        },
        set: function (v) {
            this.i.os = stringToBrush(v);
        },
        enumerable: true,
        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: true,
        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: true,
        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.m1;
        },
        set: function (v) {
            this.i.m1 = ensureEnum(CollisionAvoidanceType_$type, v);
        },
        enumerable: true,
        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.nl;
        },
        set: function (v) {
            this.i.nl = +v;
        },
        enumerable: true,
        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.nk;
        },
        set: function (v) {
            this.i.nk = +v;
        },
        enumerable: true,
        configurable: true
    });
    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.fs(item, 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.lw(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.nh(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.ng(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.fp(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.e8(toPoint(world));
        return (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.c9(item);
        return (iv);
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxNumericXAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxNumericXAxisComponent])
    ], IgxScatterBaseComponent.prototype, "xAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
    ], IgxScatterBaseComponent.prototype, "yAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterBaseComponent.prototype, "xMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterBaseComponent.prototype, "yMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "trendLineType", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterBaseComponent.prototype, "trendLineBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterBaseComponent.prototype, "actualTrendLineBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "trendLineThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "trendLinePeriod", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "markerCollisionAvoidance", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "trendLineZIndex", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxScatterBaseComponent.prototype, "maximumMarkers", null);
    return IgxScatterBaseComponent;
}(IgxMarkerSeriesComponent));
export { IgxScatterBaseComponent };
//# sourceMappingURL=igx-scatter-base-component.js.map