/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { IgrNumericXAxis } from './igr-numeric-x-axis';
import { IgrNumericYAxis } from './igr-numeric-y-axis';
import { IgrSeries } from './igr-series';
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES2015/type";
import { TriangulationStatusEventArgs } from "igniteui-react-core/ES2015/igr-triangulation-status-event-args";
/**
 * Base class for series which triangulate XY data prior to rendering.
*/
export class IgrScatterTriangulationSeries extends IgrSeries {
    constructor(props) {
        super(props);
        this._triangulationStatusChanged = null;
        this._triangulationStatusChanged_wrapped = null;
    }
    set xAxisName(value) {
        this._xAxisName = value;
    }
    get xAxisName() {
        return this._xAxisName;
    }
    set yAxisName(value) {
        this._yAxisName = value;
    }
    get yAxisName() {
        return this._yAxisName;
    }
    bindAxes(axes) {
        for (let i = 0; i < axes.length; i++) {
            if (axes[i].name == this.xAxisName) {
                this.xAxis = axes[i];
            }
            if (axes[i].name == this.yAxisName) {
                this.yAxis = axes[i];
            }
        }
    }
    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.mr;
    }
    set xMemberPath(v) {
        this.i.mr = v;
    }
    /**
     * The name of the property from which to extract the Y-coordinate for each item in the ItemsSource.
    */
    get yMemberPath() {
        return this.i.mv;
    }
    set yMemberPath(v) {
        this.i.mv = v;
    }
    /**
     * The X-Axis for this series.
    */
    get xAxis() {
        if (this.i.lt == null) {
            return null;
        }
        if (!this.i.lt.externalObject) {
            let e = new IgrNumericXAxis(null);
            e._implementation = this.i.lt;
            this.i.lt.externalObject = e;
        }
        return this.i.lt.externalObject;
    }
    set xAxis(v) {
        v == null ? this.i.lt = null : this.i.lt = v.i;
    }
    /**
     * The Y-Axis for this series.
    */
    get yAxis() {
        if (this.i.lu == null) {
            return null;
        }
        if (!this.i.lu.externalObject) {
            let e = new IgrNumericYAxis(null);
            e._implementation = this.i.lu;
            this.i.lu.externalObject = e;
        }
        return this.i.lu.externalObject;
    }
    set yAxis(v) {
        v == null ? this.i.lu = null : this.i.lu = v.i;
    }
    /**
     * 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.mj;
    }
    set triangleVertexMemberPath1(v) {
        this.i.mj = 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.ml;
    }
    set triangleVertexMemberPath2(v) {
        this.i.ml = 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.mn;
    }
    set triangleVertexMemberPath3(v) {
        this.i.mn = v;
    }
    /**
     * Gets whether or not this series is a shape series
    */
    get isShape() {
        return this.i.c5;
    }
    /**
 * Determine if object can be used as YAxis

* @param axis  * The object to check
*/
    canUseAsYAxis(axis) {
        let iv = this.i.mb(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.ma(axis);
        return (iv);
    }
    /**
     * Raised when the status of an ongoing Triangulation has changed.
    */
    get triangulationStatusChanged() {
        return this._triangulationStatusChanged;
    }
    set triangulationStatusChanged(ev) {
        if (this._triangulationStatusChanged_wrapped !== null) {
            this.i.triangulationStatusChanged = delegateRemove(this.i.triangulationStatusChanged, this._triangulationStatusChanged_wrapped);
            this._triangulationStatusChanged_wrapped = null;
            this._triangulationStatusChanged = null;
        }
        this._triangulationStatusChanged = ev;
        this._triangulationStatusChanged_wrapped = (o, e) => {
            let outerArgs = new TriangulationStatusEventArgs();
            outerArgs._provideImplementation(e);
            if (this.beforeTriangulationStatusChanged) {
                this.beforeTriangulationStatusChanged(this, outerArgs);
            }
            if (this._triangulationStatusChanged) {
                this._triangulationStatusChanged(this, outerArgs);
            }
        };
        this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, this._triangulationStatusChanged_wrapped);
    }
}
