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 var IgxShapeSeriesBaseComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxShapeSeriesBaseComponent; }) }];
var IgxShapeSeriesBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxShapeSeriesBaseComponent, _super);
    function IgxShapeSeriesBaseComponent() {
        var _this = _super.call(this) || this;
        _this._styleShape = null;
        return _this;
    }
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "shapeMemberPath", {
        /**
         * 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: function () {
            return this.i.mt;
        },
        set: function (v) {
            this.i.mt = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current ScatterBase object.
        */
        get: function () {
            if (this.i.l6 == null) {
                return null;
            }
            if (!this.i.l6.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(this.i.l6);
                if (e) {
                    e._implementation = this.i.l6;
                }
                this.i.l6.externalObject = e;
            }
            return this.i.l6.externalObject;
        },
        set: function (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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current ScatterBase object.
        */
        get: function () {
            if (this.i.l8 == null) {
                return null;
            }
            if (!this.i.l8.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(this.i.l8);
                if (e) {
                    e._implementation = this.i.l8;
                }
                this.i.l8.externalObject = e;
            }
            return this.i.l8.externalObject;
        },
        set: function (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;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "shapeFilterResolution", {
        /**
         * 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: function () {
            return this.i.mn;
        },
        set: function (v) {
            this.i.mn = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "isShape", {
        /**
         * Gets whether or not this series is a shape series
        */
        get: function () {
            return this.i.c5;
        },
        enumerable: true,
        configurable: true
    });
    IgxShapeSeriesBaseComponent.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;
    };
    IgxShapeSeriesBaseComponent.prototype.getItemValue = function (item, memberPathName) {
        var iv = this.i.fs(item, memberPathName);
        return (iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgxShapeSeriesBaseComponent.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.md(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgxShapeSeriesBaseComponent.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.mc(axis);
        return (iv);
    };
    Object.defineProperty(IgxShapeSeriesBaseComponent.prototype, "styleShape", {
        /**
         * Raised when tile's image URI should be provided
        */
        get: function () {
            var _this = this;
            if (this._styleShape == null) {
                this._styleShape = new EventEmitter();
                this.i.styleShape = delegateCombine(this.i.styleShape, function (o, e) {
                    var outerArgs = new IgxStyleShapeEventArgs();
                    outerArgs._provideImplementation(e);
                    if (_this.beforeStyleShape) {
                        _this.beforeStyleShape(_this, outerArgs);
                    }
                    _this._styleShape.emit({
                        sender: _this,
                        args: outerArgs
                    });
                });
            }
            return this._styleShape;
        },
        enumerable: true,
        configurable: true
    });
    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);
    return IgxShapeSeriesBaseComponent;
}(IgxSeriesComponent));
export { IgxShapeSeriesBaseComponent };
//# sourceMappingURL=igx-shape-series-base-component.js.map