import * as tslib_1 from "tslib";
import { IgcColumnSummaryDescription } from "./igc-column-summary-description";
import { ColumnSummaryDescriptionCollection as ColumnSummaryDescriptionCollection_internal } from "./ColumnSummaryDescriptionCollection";
var IgcColumnSummaryDescriptionCollection = /** @class */ /*@__PURE__*/ (function () {
    function IgcColumnSummaryDescriptionCollection() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcColumnSummaryDescriptionCollection.prototype.createImplementation = function () {
        return new ColumnSummaryDescriptionCollection_internal();
    };
    Object.defineProperty(IgcColumnSummaryDescriptionCollection.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcColumnSummaryDescriptionCollection.prototype.onImplementationCreated = function () {
    };
    IgcColumnSummaryDescriptionCollection.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    IgcColumnSummaryDescriptionCollection.prototype.item = function (index, value) {
        var int = null;
        if (value !== undefined) {
            int = this.i.set(index, value == null ? null : value.i);
        }
        else {
            int = this.i.get(index);
        }
        var ext = null;
        if (int != null) {
            ext = int.externalObject;
            if (!ext) {
                ext = new IgcColumnSummaryDescription();
                ext._implementation = int;
                int.externalObject = ext;
            }
        }
        return ext;
    };
    Object.defineProperty(IgcColumnSummaryDescriptionCollection.prototype, "count", {
        get: function () {
            return this.i.size();
        },
        enumerable: true,
        configurable: true
    });
    IgcColumnSummaryDescriptionCollection.prototype.toArray = function () {
        var arr = [];
        for (var i = 0; i < this.count; i++) {
            arr[i] = this.item(i);
        }
        return arr;
    };
    IgcColumnSummaryDescriptionCollection.prototype[Symbol.iterator] = function () {
        var i, item;
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    i = 0;
                    _a.label = 1;
                case 1:
                    if (!(i < this.count))
                        return [3 /*break*/, 4];
                    item = this.item(i);
                    if (item.externalObject) {
                        item = item.externalObject;
                    }
                    return [4 /*yield*/, item];
                case 2:
                    _a.sent();
                    _a.label = 3;
                case 3:
                    i++;
                    return [3 /*break*/, 1];
                case 4: return [2 /*return*/];
            }
        });
    };
    IgcColumnSummaryDescriptionCollection.prototype.findByName = function (name) {
        return null;
    };
    IgcColumnSummaryDescriptionCollection.prototype.add = function (item) {
        var iv = this.i.g((item == null ? null : item.i));
        return (iv);
    };
    IgcColumnSummaryDescriptionCollection.prototype.insert = function (index, item) {
        this.i.n(index, (item == null ? null : item.i));
    };
    IgcColumnSummaryDescriptionCollection.prototype.clear = function () {
        this.i.m();
    };
    IgcColumnSummaryDescriptionCollection.prototype.indexOf = function (item) {
        var iv = this.i.j((item == null ? null : item.i));
        return (iv);
    };
    IgcColumnSummaryDescriptionCollection.prototype.remove = function (item) {
        var iv = this.i.h((item == null ? null : item.i));
        return (iv);
    };
    IgcColumnSummaryDescriptionCollection.prototype.removeAt = function (index) {
        var iv = this.i.d(index);
        return (iv == null ? null : iv.externalObject);
    };
    return IgcColumnSummaryDescriptionCollection;
}());
export { IgcColumnSummaryDescriptionCollection };
//# sourceMappingURL=igc-column-summary-description-collection.js.map
