import { IgrValueBrushScale } from "./igr-value-brush-scale";
import { IgrContourValueResolver } from "./igr-contour-value-resolver";
import { IgrScatterTriangulationSeries } from "./igr-scatter-triangulation-series";
import { ScatterContourSeries } from "./ScatterContourSeries";
/**
 * Series class for rendering isarithmic contours based on a triangulation of X+Y+Value points in the ItemsSource.
*/
export class IgrScatterContourSeries extends IgrScatterTriangulationSeries {
    createImplementation() {
        return new ScatterContourSeries();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets whether the current series shows a line contour shape.
    */
    get isLineContour() {
        return this.i.fj;
    }
    /**
     * Gets or set the name of the property from which to retrieve the numeric values from the ItemsSource items.
    */
    get valueMemberPath() {
        return this.i.y3;
    }
    set valueMemberPath(v) {
        this.i.y3 = v;
    }
    /**
     * Gets or sets the label displayed before series value in the Data Legend.
    */
    get valueMemberAsLegendLabel() {
        return this.i.yz;
    }
    set valueMemberAsLegendLabel(v) {
        this.i.yz = v;
    }
    /**
     * Gets or sets the unit displayed after series value in the Data Legend.
    */
    get valueMemberAsLegendUnit() {
        return this.i.y1;
    }
    set valueMemberAsLegendUnit(v) {
        this.i.y1 = v;
    }
    /**
     * Gets or sets the ValueBrushScale to use when determining Brushes for each contour line, based on the values found in ValueMemberPath.
    */
    get fillScale() {
        const r = this.i.yt;
        if (r == null) {
            return null;
        }
        if (!r.externalObject) {
            let e = IgrValueBrushScale._createFromInternal(r);
            if (e) {
                e._implementation = r;
            }
            r.externalObject = e;
        }
        return r.externalObject;
    }
    set fillScale(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.yt = null : this.i.yt = v.i;
    }
    /**
     * Gets actual fill scale that is set on the FillScale property or default FillScale
    */
    get actualFillScale() {
        const r = this.i.ys;
        if (r == null) {
            return null;
        }
        if (!r.externalObject) {
            let e = IgrValueBrushScale._createFromInternal(r);
            if (e) {
                e._implementation = r;
            }
            r.externalObject = e;
        }
        return r.externalObject;
    }
    set actualFillScale(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.ys = null : this.i.ys = v.i;
    }
    /**
     * Gets or set the ContourValueResolver used to determine the numeric values of contours.
    */
    get valueResolver() {
        const r = this.i.yq;
        if (r == null) {
            return null;
        }
        if (!r.externalObject) {
            let e = IgrContourValueResolver._createFromInternal(r);
            if (e) {
                e._implementation = r;
            }
            r.externalObject = e;
        }
        return r.externalObject;
    }
    set valueResolver(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.yq = null : this.i.yq = v.i;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.fillScale && this.fillScale.name && this.fillScale.name == name) {
            return this.fillScale;
        }
        if (this.actualFillScale && this.actualFillScale.name && this.actualFillScale.name == name) {
            return this.actualFillScale;
        }
        if (this.valueResolver && this.valueResolver.name && this.valueResolver.name == name) {
            return this.valueResolver;
        }
        return null;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.fillScale && this.fillScale._styling) {
            this.fillScale._styling(container, component, this);
        }
        if (this.actualFillScale && this.actualFillScale._styling) {
            this.actualFillScale._styling(container, component, this);
        }
        if (this.valueResolver && this.valueResolver._styling) {
            this.valueResolver._styling(container, component, this);
        }
        this._inStyling = false;
    }
    getItemValue(item, memberPathName) {
        let iv = this.i.kq(item, memberPathName);
        return (iv);
    }
    /**
     * Gets the value of a requested member path from the series.
    
    * @param memberPathName  * The property name of a valid member path for the series
    */
    getMemberPathValue(memberPathName) {
        let iv = this.i.md(memberPathName);
        return (iv);
    }
}
