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 { IgxTriangulationStatusEventArgs } from "igniteui-angular-core";
import { IgxSeriesComponent } from "./igx-series-component";
/**
 * Base class for series which triangulate XY data prior to rendering.
*/
export var IgxScatterTriangulationSeriesComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterTriangulationSeriesComponent; }) }];
var IgxScatterTriangulationSeriesComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxScatterTriangulationSeriesComponent, _super);
    function IgxScatterTriangulationSeriesComponent() {
        var _this = _super.call(this) || this;
        _this._triangulationStatusChanged = null;
        return _this;
    }
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xMemberPath", {
        /**
         * The name of the property from which to extract the X-coordinate for each item in the ItemsSource.
        */
        get: function () {
            return this.i.my;
        },
        set: function (v) {
            this.i.my = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yMemberPath", {
        /**
         * The name of the property from which to extract the Y-coordinate for each item in the ItemsSource.
        */
        get: function () {
            return this.i.m2;
        },
        set: function (v) {
            this.i.m2 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xAxis", {
        /**
         * The X-Axis for this series.
        */
        get: function () {
            if (this.i.l0 == null) {
                return null;
            }
            if (!this.i.l0.externalObject) {
                var e = IgxNumericXAxisComponent._createFromInternal(this.i.l0);
                if (e) {
                    e._implementation = this.i.l0;
                }
                this.i.l0.externalObject = e;
            }
            return this.i.l0.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.l0 = null : this.i.l0 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yAxis", {
        /**
         * The Y-Axis for this series.
        */
        get: function () {
            if (this.i.l1 == null) {
                return null;
            }
            if (!this.i.l1.externalObject) {
                var e = IgxNumericYAxisComponent._createFromInternal(this.i.l1);
                if (e) {
                    e._implementation = this.i.l1;
                }
                this.i.l1.externalObject = e;
            }
            return this.i.l1.externalObject;
        },
        set: function (v) {
            if (v != null && this._stylingContainer && v._styling)
                v._styling(this._stylingContainer, this, this);
            v == null ? this.i.l1 = null : this.i.l1 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "trianglesSource", {
        /**
         * The source of triangulation data.
         * This property is optional.  If it is left as null, the triangulation will be created based on the items in the ItemsSource.  Triangulation is a demanding operation, so the runtime performance will be better when specifying a TriangulationSource, especially when a large number of data items are present.
        */
        get: function () {
            return this.i.trianglesSource;
        },
        set: function (v) {
            this.i.trianglesSource = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath1", {
        /**
         * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the first vertex point in the ItemsSource.
        */
        get: function () {
            return this.i.mq;
        },
        set: function (v) {
            this.i.mq = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath2", {
        /**
         * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the second vertex point in the ItemsSource.
        */
        get: function () {
            return this.i.ms;
        },
        set: function (v) {
            this.i.ms = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath3", {
        /**
         * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the third vertex point in the ItemsSource.
        */
        get: function () {
            return this.i.mu;
        },
        set: function (v) {
            this.i.mu = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "isShape", {
        /**
         * Gets whether or not this series is a shape series
        */
        get: function () {
            return this.i.c5;
        },
        enumerable: true,
        configurable: true
    });
    IgxScatterTriangulationSeriesComponent.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;
    };
    IgxScatterTriangulationSeriesComponent.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
    */
    IgxScatterTriangulationSeriesComponent.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.mi(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgxScatterTriangulationSeriesComponent.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.mh(axis);
        return (iv);
    };
    Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangulationStatusChanged", {
        /**
         * Raised when the status of an ongoing Triangulation has changed.
        */
        get: function () {
            var _this = this;
            if (this._triangulationStatusChanged == null) {
                this._triangulationStatusChanged = new EventEmitter();
                this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new IgxTriangulationStatusEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeTriangulationStatusChanged) {
                            _this.beforeTriangulationStatusChanged(_this, outerArgs);
                        }
                        _this._triangulationStatusChanged.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._triangulationStatusChanged;
        },
        enumerable: true,
        configurable: true
    });
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterTriangulationSeriesComponent.prototype, "xMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterTriangulationSeriesComponent.prototype, "yMemberPath", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxNumericXAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxNumericXAxisComponent])
    ], IgxScatterTriangulationSeriesComponent.prototype, "xAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxNumericYAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxNumericYAxisComponent])
    ], IgxScatterTriangulationSeriesComponent.prototype, "yAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Array),
        tslib_1.__metadata("design:paramtypes", [Array])
    ], IgxScatterTriangulationSeriesComponent.prototype, "trianglesSource", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath1", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath2", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath3", null);
    tslib_1.__decorate([
        Output(),
        tslib_1.__metadata("design:type", EventEmitter),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxScatterTriangulationSeriesComponent.prototype, "triangulationStatusChanged", null);
    return IgxScatterTriangulationSeriesComponent;
}(IgxSeriesComponent));
export { IgxScatterTriangulationSeriesComponent };
//# sourceMappingURL=igx-scatter-triangulation-series-component.js.map