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.
*/
var IgcGridSelectedItemsChangedEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgcGridSelectedItemsChangedEventArgs() {
        this._currentItems = null;
        this._addedItems = null;
        this._removedItems = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcGridSelectedItemsChangedEventArgs.prototype.createImplementation = function () {
        return new GridSelectedItemsChangedEventArgs_internal();
    };
    Object.defineProperty(IgcGridSelectedItemsChangedEventArgs.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridSelectedItemsChangedEventArgs.prototype.onImplementationCreated = function () {
    };
    IgcGridSelectedItemsChangedEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcGridSelectedItemsChangedEventArgs.prototype, "currentItems", {
        /**
         * The items added to the selection.
        */
        get: function () {
            if (this._currentItems === null) {
                var coll = new IgcGridSelectedItemsCollection();
                var innerColl = this.i.currentItems;
                if (!innerColl) {
                    innerColl = new GridSelectedItemsCollection_internal();
                }
                this._currentItems = coll._fromInner(innerColl);
                this.i.currentItems = innerColl;
            }
            return this._currentItems;
        },
        set: function (v) {
            if (this._currentItems !== null) {
                this._currentItems._setSyncTarget(null);
                this._currentItems = null;
            }
            var coll = new IgcGridSelectedItemsCollection();
            this._currentItems = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(Base.$type);
            var innerColl = this.i.currentItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._currentItems._setSyncTarget(syncColl);
            this.i.currentItems = innerColl;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridSelectedItemsChangedEventArgs.prototype, "addedItems", {
        /**
         * The items added to the selection.
        */
        get: function () {
            if (this._addedItems === null) {
                var coll = new IgcGridSelectedItemsCollection();
                var innerColl = this.i.addedItems;
                if (!innerColl) {
                    innerColl = new GridSelectedItemsCollection_internal();
                }
                this._addedItems = coll._fromInner(innerColl);
                this.i.addedItems = innerColl;
            }
            return this._addedItems;
        },
        set: function (v) {
            if (this._addedItems !== null) {
                this._addedItems._setSyncTarget(null);
                this._addedItems = null;
            }
            var coll = new IgcGridSelectedItemsCollection();
            this._addedItems = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(Base.$type);
            var innerColl = this.i.addedItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._addedItems._setSyncTarget(syncColl);
            this.i.addedItems = innerColl;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcGridSelectedItemsChangedEventArgs.prototype, "removedItems", {
        /**
         * The items removed from the selection.
        */
        get: function () {
            if (this._removedItems === null) {
                var coll = new IgcGridSelectedItemsCollection();
                var innerColl = this.i.removedItems;
                if (!innerColl) {
                    innerColl = new GridSelectedItemsCollection_internal();
                }
                this._removedItems = coll._fromInner(innerColl);
                this.i.removedItems = innerColl;
            }
            return this._removedItems;
        },
        set: function (v) {
            if (this._removedItems !== null) {
                this._removedItems._setSyncTarget(null);
                this._removedItems = null;
            }
            var coll = new IgcGridSelectedItemsCollection();
            this._removedItems = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(Base.$type);
            var innerColl = this.i.removedItems;
            if (!innerColl) {
                innerColl = new GridSelectedItemsCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._removedItems._setSyncTarget(syncColl);
            this.i.removedItems = innerColl;
        },
        enumerable: true,
        configurable: true
    });
    return IgcGridSelectedItemsChangedEventArgs;
}());
export { IgcGridSelectedItemsChangedEventArgs };
//# sourceMappingURL=igc-grid-selected-items-changed-event-args.js.map
