import { IgrSeriesLayerPropertyOverlayCollection } from "./igr-series-layer-property-overlay-collection";
import { SeriesLayer as SeriesLayer_internal } from "./SeriesLayer";
import { SeriesLayerPropertyOverlayCollection as SeriesLayerPropertyOverlayCollection_internal } from "./SeriesLayerPropertyOverlayCollection";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { SyncableObservableCollection$1 } from "igniteui-react-core";
/**
 * Represents an axis annotation
*/
var IgrSeriesLayer = /** @class */ /*@__PURE__*/ (function () {
    function IgrSeriesLayer() {
        this.mounted = false;
        this._propertyOverlays = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    }
    IgrSeriesLayer.prototype.createImplementation = function () {
        return new SeriesLayer_internal();
    };
    Object.defineProperty(IgrSeriesLayer.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgrSeriesLayer.prototype.onImplementationCreated = function () {
    };
    IgrSeriesLayer.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    };
    Object.defineProperty(IgrSeriesLayer.prototype, "transitionOutIsInProgress", {
        get: function () {
            return this.i.t;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrSeriesLayer.prototype, "zIndex", {
        /**
         * Gets or sets the ZIndex to use for layering the series layers.
        */
        get: function () {
            return this.i.ac;
        },
        set: function (v) {
            this.i.ac = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrSeriesLayer.prototype, "propertyOverlays", {
        /**
         * Gets the current extra layers for the series.
        */
        get: function () {
            if (this._propertyOverlays === null) {
                var coll = new IgrSeriesLayerPropertyOverlayCollection();
                var innerColl = this.i.m;
                if (!innerColl) {
                    innerColl = new SeriesLayerPropertyOverlayCollection_internal();
                }
                this._propertyOverlays = coll._fromInner(innerColl);
            }
            return this._propertyOverlays;
        },
        set: function (v) {
            if (this._propertyOverlays !== null) {
                this._propertyOverlays._setSyncTarget(null);
                this._propertyOverlays = null;
            }
            var coll = new IgrSeriesLayerPropertyOverlayCollection();
            this._propertyOverlays = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(SeriesLayerPropertyOverlay.$type);
            var innerColl = this.i.m;
            if (!innerColl) {
                innerColl = new SeriesLayerPropertyOverlayCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._propertyOverlays._setSyncTarget(syncColl);
        },
        enumerable: false,
        configurable: true
    });
    IgrSeriesLayer.prototype.findByName = function (name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        if (this.propertyOverlays != null && this.propertyOverlays.findByName && this.propertyOverlays.findByName(name)) {
            return this.propertyOverlays.findByName(name);
        }
        return null;
    };
    IgrSeriesLayer.prototype.playTransitionOutAndRemove = function () {
        this.i.au();
    };
    IgrSeriesLayer.prototype.playTransitionIn = function () {
        this.i.at();
    };
    return IgrSeriesLayer;
}());
export { IgrSeriesLayer };
