import { IgcGridSelectedItemsCollection } from "./igc-grid-selected-items-collection";
import { GridSelectedItemsChangedEventArgs as GridSelectedItemsChangedEventArgs_internal } from "./GridSelectedItemsChangedEventArgs";
import { GridSelectedItemsCollection as GridSelectedItemsCollection_internal } from "./GridSelectedItemsCollection";
import { Base } from "igniteui-webcomponents-core";
import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core";
/**
 * Information about the changing selected items in the grid.
*/
export class IgcGridSelectedItemsChangedEventArgs {
    constructor() {
        this._currentItems = null;
        this._addedItems = null;
        this._removedItems = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    createImplementation() {
        return new GridSelectedItemsChangedEventArgs_internal();
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * The items added to the selection.
    */
    get currentItems() {
        if (this._currentItems === null) {
            let coll = new IgcGridSelectedItemsCollection();
            let innerColl = this.i.currentItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_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 IgcGridSelectedItemsCollection();
        this._currentItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.currentItems;
        if (!innerColl) {
            innerColl = new GridSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._currentItems._setSyncTarget(syncColl);
        this.i.currentItems = innerColl;
    }
    /**
     * The items added to the selection.
    */
    get addedItems() {
        if (this._addedItems === null) {
            let coll = new IgcGridSelectedItemsCollection();
            let innerColl = this.i.addedItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_internal();
            }
            this._addedItems = coll._fromInner(innerColl);
            this.i.addedItems = innerColl;
        }
        return this._addedItems;
    }
    set addedItems(v) {
        if (this._addedItems !== null) {
            this._addedItems._setSyncTarget(null);
            this._addedItems = null;
        }
        let coll = new IgcGridSelectedItemsCollection();
        this._addedItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.addedItems;
        if (!innerColl) {
            innerColl = new GridSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._addedItems._setSyncTarget(syncColl);
        this.i.addedItems = innerColl;
    }
    /**
     * The items removed from the selection.
    */
    get removedItems() {
        if (this._removedItems === null) {
            let coll = new IgcGridSelectedItemsCollection();
            let innerColl = this.i.removedItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_internal();
            }
            this._removedItems = coll._fromInner(innerColl);
            this.i.removedItems = innerColl;
        }
        return this._removedItems;
    }
    set removedItems(v) {
        if (this._removedItems !== null) {
            this._removedItems._setSyncTarget(null);
            this._removedItems = null;
        }
        let coll = new IgcGridSelectedItemsCollection();
        this._removedItems = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Base.$type);
        let innerColl = this.i.removedItems;
        if (!innerColl) {
            innerColl = new GridSelectedItemsCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._removedItems._setSyncTarget(syncColl);
        this.i.removedItems = innerColl;
    }
}
//# sourceMappingURL=igc-grid-selected-items-changed-event-args.js.map
