import { IgcGridColumnCollection } from "./igc-grid-column-collection";
import { GridColumnsChangedEventArgs as GridColumnsChangedEventArgs_internal } from "./GridColumnsChangedEventArgs";
import { GridColumnCollection as GridColumnCollection_internal } from "./GridColumnCollection";
import { Column } from "./Column";
import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core";
/**
 * Information about the generated columns.
*/
var IgcGridColumnsChangedEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgcGridColumnsChangedEventArgs() {
        this._columns = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcGridColumnsChangedEventArgs.prototype.createImplementation = function () {
        return new GridColumnsChangedEventArgs_internal();
    };
    Object.defineProperty(IgcGridColumnsChangedEventArgs.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridColumnsChangedEventArgs.prototype.onImplementationCreated = function () {
    };
    IgcGridColumnsChangedEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcGridColumnsChangedEventArgs.prototype, "columns", {
        get: function () {
            if (this._columns === null) {
                var coll = new IgcGridColumnCollection();
                var innerColl = this.i.columns;
                if (!innerColl) {
                    innerColl = new GridColumnCollection_internal();
                }
                this._columns = coll._fromInner(innerColl);
                this.i.columns = innerColl;
            }
            return this._columns;
        },
        set: function (v) {
            if (this._columns !== null) {
                this._columns._setSyncTarget(null);
                this._columns = null;
            }
            var coll = new IgcGridColumnCollection();
            this._columns = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(Column.$type);
            var innerColl = this.i.columns;
            if (!innerColl) {
                innerColl = new GridColumnCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._columns._setSyncTarget(syncColl);
            this.i.columns = innerColl;
        },
        enumerable: true,
        configurable: true
    });
    return IgcGridColumnsChangedEventArgs;
}());
export { IgcGridColumnsChangedEventArgs };
//# sourceMappingURL=igc-grid-columns-changed-event-args.js.map
