import { IgcGridColumnCollection } from "./igc-grid-column-collection";
import { GridColumnsAutoGeneratedEventArgs as GridColumnsAutoGeneratedEventArgs_internal } from "./GridColumnsAutoGeneratedEventArgs";
import { GridColumnCollection as GridColumnCollection_internal } from "./GridColumnCollection";
import { Column } from "./Column";
import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core";
/**
 * Information about the generated columns.
*/
var IgcGridColumnsAutoGeneratedEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgcGridColumnsAutoGeneratedEventArgs() {
        this._columns = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcGridColumnsAutoGeneratedEventArgs.prototype.createImplementation = function () {
        return new GridColumnsAutoGeneratedEventArgs_internal();
    };
    Object.defineProperty(IgcGridColumnsAutoGeneratedEventArgs.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcGridColumnsAutoGeneratedEventArgs.prototype.onImplementationCreated = function () {
    };
    IgcGridColumnsAutoGeneratedEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcGridColumnsAutoGeneratedEventArgs.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 IgcGridColumnsAutoGeneratedEventArgs;
}());
export { IgcGridColumnsAutoGeneratedEventArgs };
//# sourceMappingURL=igc-grid-columns-auto-generated-event-args.js.map
