import { IgrSizeScale } from "./igr-size-scale";
import { IgrBrushScale } from "./igr-brush-scale";
import { IgrScatterBase } from "./igr-scatter-base";
import { BubbleSeries } from "./BubbleSeries";
import { ensureBool } from "igniteui-react-core";
/**
 * Represents a IgxDataChartComponent bubble series.
*/
export class IgrBubbleSeries extends IgrScatterBase {
    createImplementation() {
        return new BubbleSeries();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the radius mapping property for the current series object.
    */
    get radiusMemberPath() {
        return this.i.tr;
    }
    set radiusMemberPath(v) {
        this.i.tr = v;
    }
    /**
     * Gets or sets the radius size scale for the bubbles.
    */
    get radiusScale() {
        if (this.i.sz == null) {
            return null;
        }
        if (!this.i.sz.externalObject) {
            let e = IgrSizeScale._createFromInternal(this.i.sz);
            if (e) {
                e._implementation = this.i.sz;
            }
            this.i.sz.externalObject = e;
        }
        return this.i.sz.externalObject;
    }
    set radiusScale(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.sz = null : this.i.sz = v.i;
    }
    /**
     * Gets or sets the Label mapping property for the current series object.
    */
    get labelMemberPath() {
        return this.i.tl;
    }
    set labelMemberPath(v) {
        this.i.tl = v;
    }
    /**
     * Gets or sets the fill mapping property for the current series object.
    */
    get fillMemberPath() {
        return this.i.tg;
    }
    set fillMemberPath(v) {
        this.i.tg = v;
    }
    /**
     * Gets or sets the brush scale for the fill brush of markers.
    */
    get fillScale() {
        if (this.i.sx == null) {
            return null;
        }
        if (!this.i.sx.externalObject) {
            let e = IgrBrushScale._createFromInternal(this.i.sx);
            if (e) {
                e._implementation = this.i.sx;
            }
            this.i.sx.externalObject = e;
        }
        return this.i.sx.externalObject;
    }
    set fillScale(v) {
        if (v != null && this._stylingContainer && v._styling)
            v._styling(this._stylingContainer, this, this);
        v == null ? this.i.sx = null : this.i.sx = v.i;
    }
    /**
     * Gets or sets whether or not the FillScale uses global min/max values of FillMemberPath from multiple series.
     * This setting applies only if multiple series are using the same FillScale.
    */
    get fillScaleUseGlobalValues() {
        return this.i.s7;
    }
    set fillScaleUseGlobalValues(v) {
        this.i.s7 = ensureBool(v);
    }
    /**
     * Gets or sets whether or not the marker outline should use FillScale like the marker fill does.
     * This setting applies only if the current series has a FillScale set and it overrides MarkerOutline setting.
    */
    get markerOutlineUsesFillScale() {
        return this.i.s8;
    }
    set markerOutlineUsesFillScale(v) {
        this.i.s8 = ensureBool(v);
    }
    /**
     * Gets or sets brightness of the marker outline. Using negative value will change marker outline to darker color and positive value will change marker outline to brighter color
     * Note you can use any values between minimum value of -1 (darkest outline) and maximum value of 1 (brightest outline)
    */
    get markerOutlineBrightness() {
        return this.i.te;
    }
    set markerOutlineBrightness(v) {
        this.i.te = +v;
    }
    /**
     * Gets or sets brightness of the marker fill. Using negative value will change marker fill to darker color and positive value will change marker fill to brighter color
     * Note you can use any values between minimum value of -1 (darkest fill) and maximum value of 1 (brightest fill)
    */
    get markerBrushBrightness() {
        return this.i.td;
    }
    set markerBrushBrightness(v) {
        this.i.td = +v;
    }
    /**
     * Gets or sets the whether or not the RadiusScale uses global values of RadiusMemberPath from multiple series.
     * This setting applies only if multiple series are using the same RadiusScale.
    */
    get radiusScaleUseGlobalValues() {
        return this.i.s9;
    }
    set radiusScaleUseGlobalValues(v) {
        this.i.s9 = ensureBool(v);
    }
    /**
     * Overridden by derived series classes to indicate when marker-less display is preferred or not.
    */
    get isMarkerlessDisplayPreferred() {
        return this.i.dd;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.radiusScale && this.radiusScale.name && this.radiusScale.name == name) {
            return this.radiusScale;
        }
        if (this.fillScale && this.fillScale.name && this.fillScale.name == name) {
            return this.fillScale;
        }
        return null;
    }
    _styling(container, component, parent) {
        super._styling(container, component, parent);
        this._inStyling = true;
        if (this.radiusScale && this.radiusScale._styling) {
            this.radiusScale._styling(container, component, this);
        }
        if (this.fillScale && this.fillScale._styling) {
            this.fillScale._styling(container, component, this);
        }
        this._inStyling = false;
    }
    getItemValue(item, memberPathName) {
        let iv = this.i.gt(item, memberPathName);
        return (iv);
    }
}
//# sourceMappingURL=igr-bubble-series.js.map
