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 const IgxScatterTriangulationSeriesComponent_PROVIDERS = [{ provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxScatterTriangulationSeriesComponent) }];
export class IgxScatterTriangulationSeriesComponent extends IgxSeriesComponent {
    constructor() {
        super();
        this._triangulationStatusChanged = null;
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * The name of the property from which to extract the X-coordinate for each item in the ItemsSource.
    */
    get xMemberPath() {
        return this.i.my;
    }
    set xMemberPath(v) {
        this.i.my = v;
    }
    /**
     * The name of the property from which to extract the Y-coordinate for each item in the ItemsSource.
    */
    get yMemberPath() {
        return this.i.m2;
    }
    set yMemberPath(v) {
        this.i.m2 = v;
    }
    /**
     * The X-Axis for this series.
    */
    get xAxis() {
        if (this.i.l0 == null) {
            return null;
        }
        if (!this.i.l0.externalObject) {
            let e = IgxNumericXAxisComponent._createFromInternal(this.i.l0);
            if (e) {
                e._implementation = this.i.l0;
            }
            this.i.l0.externalObject = e;
        }
        return this.i.l0.externalObject;
    }
    set xAxis(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;
    }
    /**
     * The Y-Axis for this series.
    */
    get yAxis() {
        if (this.i.l1 == null) {
            return null;
        }
        if (!this.i.l1.externalObject) {
            let e = IgxNumericYAxisComponent._createFromInternal(this.i.l1);
            if (e) {
                e._implementation = this.i.l1;
            }
            this.i.l1.externalObject = e;
        }
        return this.i.l1.externalObject;
    }
    set yAxis(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;
    }
    /**
     * 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 trianglesSource() {
        return this.i.trianglesSource;
    }
    set trianglesSource(v) {
        this.i.trianglesSource = v;
    }
    /**
     * 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 triangleVertexMemberPath1() {
        return this.i.mq;
    }
    set triangleVertexMemberPath1(v) {
        this.i.mq = v;
    }
    /**
     * 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 triangleVertexMemberPath2() {
        return this.i.ms;
    }
    set triangleVertexMemberPath2(v) {
        this.i.ms = v;
    }
    /**
     * 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 triangleVertexMemberPath3() {
        return this.i.mu;
    }
    set triangleVertexMemberPath3(v) {
        this.i.mu = 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.mi(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.mh(axis);
        return (iv);
    }
    /**
     * Raised when the status of an ongoing Triangulation has changed.
    */
    get triangulationStatusChanged() {
        if (this._triangulationStatusChanged == null) {
            this._triangulationStatusChanged = new EventEmitter();
            this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, (o, e) => {
                this._runInZone(() => {
                    let outerArgs = new IgxTriangulationStatusEventArgs();
                    outerArgs._provideImplementation(e);
                    if (this.beforeTriangulationStatusChanged) {
                        this.beforeTriangulationStatusChanged(this, outerArgs);
                    }
                    this._triangulationStatusChanged.emit({
                        sender: this,
                        args: outerArgs
                    });
                });
            });
        }
        return this._triangulationStatusChanged;
    }
}
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);
//# sourceMappingURL=igx-scatter-triangulation-series-component.js.map