import * as tslib_1 from "tslib";
import { EventEmitter, Output, forwardRef, 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 { IgxStyleShapeEventArgs } from "./igx-style-shape-event-args";
import { IgxSeriesComponent } from "./igx-series-component";
/**
 * Series class for rendering polygons.
*/
export const IgxShapeSeriesBaseComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxShapeSeriesBaseComponent) }];
export class IgxShapeSeriesBaseComponent extends IgxSeriesComponent {
    constructor() {
        super();
        this._styleShape = null;
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * The name of the property on ItemsSource items which, for each shape, contains a list of points to be converted to a polygon.
     * To be consistent with the Shapefile technical description, it is expected that each list of points is defined as an IEnumerable of IEnumerable of Point, or in other words, a list of lists of points.
    */
    get shapeMemberPath() {
        return this.i.mt;
    }
    set shapeMemberPath(v) {
        this.i.mt = v;
    }
    /**
     * Gets or sets the effective x-axis for the current ScatterBase object.
    */
    get xAxis() {
        if (this.i.l6 == null) {
            return null;
        }
        if (!this.i.l6.externalObject) {
            let e = IgxNumericXAxisComponent._createFromInternal(this.i.l6);
            if (e) {
                e._implementation = this.i.l6;
            }
            this.i.l6.externalObject = e;
        }
        return this.i.l6.externalObject;
    }
    set xAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.l6 = null : this.i.l6 = v.i;
    }
    /**
     * Gets or sets the effective y-axis for the current ScatterBase object.
    */
    get yAxis() {
        if (this.i.l8 == null) {
            return null;
        }
        if (!this.i.l8.externalObject) {
            let e = IgxNumericYAxisComponent._createFromInternal(this.i.l8);
            if (e) {
                e._implementation = this.i.l8;
            }
            this.i.l8.externalObject = e;
        }
        return this.i.l8.externalObject;
    }
    set yAxis(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.l8 = null : this.i.l8 = v.i;
    }
    /**
     * The resolution at which to filter out shapes in the series.  For example, if the ShapeFilterResolution is set to 3, then elements with a bounding rectangle smaller than 3 X 3 pixels will be filtered out.
     * In the case of ScatterPolylineSeries, the resolution is compared to either dimension, rather than both.  In other words, a polyline will not be filtered if its height or its width exceeds the value of this property.  Whereas with a ShapeSeries, both the height and the width must exceed the value of this property.
    */
    get shapeFilterResolution() {
        return this.i.mn;
    }
    set shapeFilterResolution(v) {
        this.i.mn = +v;
    }
    /**
     * Gets whether or not this series is a shape series
    */
    get isShape() {
        return this.i.c5;
    }
    _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);
    }
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    canUseAsYAxis(axis) {
        let iv = this.i.md(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.mc(axis);
        return (iv);
    }
    /**
     * Raised when tile's image URI should be provided
    */
    get styleShape() {
        if (this._styleShape == null) {
            this._styleShape = new EventEmitter();
            this.i.styleShape = delegateCombine(this.i.styleShape, (o, e) => {
                let outerArgs = new IgxStyleShapeEventArgs();
                outerArgs._provideImplementation(e);
                if (this.beforeStyleShape) {
                    this.beforeStyleShape(this, outerArgs);
                }
                this._styleShape.emit({
                    sender: this,
                    args: outerArgs
                });
            });
        }
        return this._styleShape;
    }
}
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", String),
    tslib_1.__metadata("design:paramtypes", [String])
], IgxShapeSeriesBaseComponent.prototype, "shapeMemberPath", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxNumericXAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxNumericXAxisComponent])
], IgxShapeSeriesBaseComponent.prototype, "xAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
    tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
], IgxShapeSeriesBaseComponent.prototype, "yAxis", null);
tslib_1.__decorate([
    Input(),
    tslib_1.__metadata("design:type", Number),
    tslib_1.__metadata("design:paramtypes", [Number])
], IgxShapeSeriesBaseComponent.prototype, "shapeFilterResolution", null);
tslib_1.__decorate([
    Output(),
    tslib_1.__metadata("design:type", EventEmitter),
    tslib_1.__metadata("design:paramtypes", [])
], IgxShapeSeriesBaseComponent.prototype, "styleShape", null);
//# sourceMappingURL=igx-shape-series-base-component.js.map