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 const IgxScatterBaseComponent_PROVIDERS = [{ provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxScatterBaseComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxScatterBaseComponent) }];
export class IgxScatterBaseComponent extends IgxMarkerSeriesComponent {
    constructor() {
        super();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Checks if this series is a scatter series
    */
    get isScatter() {
        return this.i.c4;
    }
    /**
     * Gets or sets the effective x-axis for the current object.
    */
    get xAxis() {
        if (this.i.xAxis == null) {
            return null;
        }
        if (!this.i.xAxis.externalObject) {
            let e = IgxNumericXAxisComponent._createFromInternal(this.i.xAxis);
            if (e) {
                e._implementation = this.i.xAxis;
            }
            this.i.xAxis.externalObject = e;
        }
        return this.i.xAxis.externalObject;
    }
    set xAxis(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;
    }
    /**
     * Gets or sets the effective y-axis for the current object.
    */
    get yAxis() {
        if (this.i.yAxis == null) {
            return null;
        }
        if (!this.i.yAxis.externalObject) {
            let e = IgxNumericYAxisComponent._createFromInternal(this.i.yAxis);
            if (e) {
                e._implementation = this.i.yAxis;
            }
            this.i.yAxis.externalObject = e;
        }
        return this.i.yAxis.externalObject;
    }
    set yAxis(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;
    }
    /**
     * Gets or sets the value mapping property for the current series object.
    */
    get xMemberPath() {
        return this.i.nr;
    }
    set xMemberPath(v) {
        this.i.nr = v;
    }
    /**
     * Gets or sets the value mapping property for the current series object.
    */
    get yMemberPath() {
        return this.i.nv;
    }
    set yMemberPath(v) {
        this.i.nv = v;
    }
    /**
     * Gets or sets the trend type for the current scatter series.
    */
    get trendLineType() {
        return this.i.trendLineType;
    }
    set trendLineType(v) {
        this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
    }
    /**
     * Gets or sets the brush to use to draw the trend line.
    */
    get trendLineBrush() {
        return brushToString(this.i.trendLineBrush);
    }
    set trendLineBrush(v) {
        this.i.trendLineBrush = stringToBrush(v);
    }
    /**
     * Gets the effective TrendLineBrush for this series.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.os);
    }
    set actualTrendLineBrush(v) {
        this.i.os = stringToBrush(v);
    }
    /**
     * Gets or sets the thickness of the current scatter series object's trend line.
    */
    get trendLineThickness() {
        return this.i.trendLineThickness;
    }
    set trendLineThickness(v) {
        this.i.trendLineThickness = +v;
    }
    /**
     * 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 trendLinePeriod() {
        return this.i.trendLinePeriod;
    }
    set trendLinePeriod(v) {
        this.i.trendLinePeriod = +v;
    }
    /**
     * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision.
    */
    get markerCollisionAvoidance() {
        return this.i.m1;
    }
    set markerCollisionAvoidance(v) {
        this.i.m1 = ensureEnum(CollisionAvoidanceType_$type, v);
    }
    /**
     * 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 trendLineZIndex() {
        return this.i.nl;
    }
    set trendLineZIndex(v) {
        this.i.nl = +v;
    }
    /**
     * 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 maximumMarkers() {
        return this.i.nk;
    }
    set maximumMarkers(v) {
        this.i.nk = +v;
    }
    _styling(container, component, parent) {
        super._styling(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;
    }
    getItemValue(item, memberPathName) {
        let 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
    */
    getSeriesValueMarkerBoundingBox(world) {
        let iv = this.i.lw(toPoint(world));
        return fromRect(iv);
    }
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    canUseAsYAxis(axis) {
        let iv = this.i.nh(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let 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.
    */
    getItem(world) {
        let 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.
    */
    getItemIndex(world) {
        let 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.
    */
    scrollIntoView(item) {
        let 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);
//# sourceMappingURL=igx-scatter-base-component.js.map