import { IgrStyle } from "igniteui-react-core";
import { IgrShapeSeriesBase } from "./igr-shape-series-base";
import { ScatterPolylineSeries } from "./ScatterPolylineSeries";
/**
 * Series class used for displaying multiple polylines for datasources which contain multiple lists of points.
*/
export class IgrScatterPolylineSeries extends IgrShapeSeriesBase {
    createImplementation() {
        return new ScatterPolylineSeries();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets whether the current series shows a polyline shape.
    */
    get isPolyline() {
        return this.i.fr;
    }
    /**
     * The default style to apply to all Shapes in the series.
    */
    get shapeStyle() {
        const r = this.i.aab;
        if (r == null) {
            return null;
        }
        if (!r.externalObject) {
            let e = new IgrStyle();
            if (r.$type) {
                e._implementation = r;
            }
            else {
                if (e.i.setNativeElement) {
                    e.i.setNativeElement(r);
                }
            }
            r.externalObject = e;
        }
        return r.externalObject;
    }
    set shapeStyle(v) {
        v == null ? this.i.aab = null : this.i.aab = v.i;
    }
    findByName(name) {
        var baseResult = super.findByName(name);
        if (baseResult) {
            return baseResult;
        }
        if (this.shapeStyle && this.shapeStyle.name && this.shapeStyle.name == name) {
            return this.shapeStyle;
        }
        return null;
    }
}
