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.
*/
export class IgcGridColumnsChangedEventArgs {
    constructor() {
        this._columns = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    createImplementation() {
        return new GridColumnsChangedEventArgs_internal();
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    get columns() {
        if (this._columns === null) {
            let coll = new IgcGridColumnCollection();
            let innerColl = this.i.columns;
            if (!innerColl) {
                innerColl = new GridColumnCollection_internal();
            }
            this._columns = coll._fromInner(innerColl);
            this.i.columns = innerColl;
        }
        return this._columns;
    }
    set columns(v) {
        if (this._columns !== null) {
            this._columns._setSyncTarget(null);
            this._columns = null;
        }
        let coll = new IgcGridColumnCollection();
        this._columns = coll._fromOuter(v);
        let syncColl = new SyncableObservableCollection$1(Column.$type);
        let innerColl = this.i.columns;
        if (!innerColl) {
            innerColl = new GridColumnCollection_internal();
        }
        syncColl._inner = innerColl;
        syncColl.clear();
        this._columns._setSyncTarget(syncColl);
        this.i.columns = innerColl;
    }
}
//# sourceMappingURL=igc-grid-columns-changed-event-args.js.map
