import { __extends } from "tslib";
import { IgCollection } from './IgCollection';
import { SyncableObservableCollection$2 } from './SyncableObservableCollection$2';
import { Base } from "./type";
var IgcObjectCollection = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgcObjectCollection, _super);
    function IgcObjectCollection(list) {
        var _this = _super.call(this) || this;
        if (list) {
            for (var i = 0; i < list.length; i++) {
                _this.add(list[i]);
            }
        }
        return _this;
    }
    IgcObjectCollection.prototype._createInnerColl = function () {
        var coll = new SyncableObservableCollection$2(Base.$type, Base.$type, 0);
        coll.compare = function (ext, int) {
            var comp = ext;
            if (comp.equals) {
                return comp.equals(int);
            }
            return comp === int;
        };
        coll.createTo = function (ext) {
            return ext;
        };
        coll.createFrom = function (int) {
            return int;
        };
        return coll;
    };
    return IgcObjectCollection;
}(IgCollection));
export { IgcObjectCollection };
