import { IgxFunnelChartSelectedItemsCollection } from "./igx-funnel-chart-selected-items-collection";
import { FunnelChartSelectedItemsCollection as FunnelChartSelectedItemsCollection_internal } from "./FunnelChartSelectedItemsCollection";
import { Base } from "igniteui-angular-core";
import { SyncableObservableCollection$1 } from "igniteui-angular-core";
/**
 * Provides data for the SelectedItemsChanged event.
*/
export class IgxFunnelChartSelectedItemsChangedEventArgs {
    constructor() {
        this._oldItems = null;
        this._newItems = null;
        this._currentItems = null;
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * A list of the previously selected items.
    */
    get oldItems() {
        if (this._oldItems === null) {
            let coll = new IgxFunnelChartSelectedItemsCollection();
            let innerColl = this.i.oldItems;
            if (!innerColl) {
                innerColl = new FunnelChartSelectedItemsCollection_internal();
            }
            this._oldItems = coll._fromInner(innerColl);
            this.i.oldItems = innerColl;
        }
        return this._oldItems;
    }
    set oldItems(v) {
        if (this._oldItems !== null) {
            this._oldItems._setSyncTarget(null);
            this._oldItems = null;
        }
        let coll = new IgxFunnelChartSelectedItemsCollection();
        this._oldItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.oldItems;
        if (!innerColl) {
            innerColl = new FunnelChartSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._oldItems._setSyncTarget(syncColl);
        this.i.oldItems = innerColl;
    }
    /**
     * A list of the items being selected.
    */
    get newItems() {
        if (this._newItems === null) {
            let coll = new IgxFunnelChartSelectedItemsCollection();
            let innerColl = this.i.newItems;
            if (!innerColl) {
                innerColl = new FunnelChartSelectedItemsCollection_internal();
            }
            this._newItems = coll._fromInner(innerColl);
            this.i.newItems = innerColl;
        }
        return this._newItems;
    }
    set newItems(v) {
        if (this._newItems !== null) {
            this._newItems._setSyncTarget(null);
            this._newItems = null;
        }
        let coll = new IgxFunnelChartSelectedItemsCollection();
        this._newItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.newItems;
        if (!innerColl) {
            innerColl = new FunnelChartSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._newItems._setSyncTarget(syncColl);
        this.i.newItems = innerColl;
    }
    /**
     * A list of the current items selected.
    */
    get currentItems() {
        if (this._currentItems === null) {
            let coll = new IgxFunnelChartSelectedItemsCollection();
            let innerColl = this.i.currentItems;
            if (!innerColl) {
                innerColl = new FunnelChartSelectedItemsCollection_internal();
            }
            this._currentItems = coll._fromInner(innerColl);
            this.i.currentItems = innerColl;
        }
        return this._currentItems;
    }
    set currentItems(v) {
        if (this._currentItems !== null) {
            this._currentItems._setSyncTarget(null);
            this._currentItems = null;
        }
        let coll = new IgxFunnelChartSelectedItemsCollection();
        this._currentItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.currentItems;
        if (!innerColl) {
            innerColl = new FunnelChartSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._currentItems._setSyncTarget(syncColl);
        this.i.currentItems = innerColl;
    }
}
