import { __extends } from "tslib";
import { IgCollection } from './IgCollection';
import { SyncableObservableCollection$2 } from './SyncableObservableCollection$2';
import { markType } from './type';
import { ToolCommandArgument } from './ToolCommandArgument';
var IgcToolCommandArgumentCollection = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgcToolCommandArgumentCollection, _super);
    function IgcToolCommandArgumentCollection(list) {
        var _this = _super.call(this) || this;
        if (!ToolCommandArgument.$type) {
            ToolCommandArgument.$type = markType(ToolCommandArgument, "ToolCommandArgument");
        }
        if (list) {
            for (var i = 0; i < list.length; i++) {
                _this.add(list[i]);
            }
        }
        return _this;
    }
    IgcToolCommandArgumentCollection.prototype._createInnerColl = function () {
        if (!ToolCommandArgument.$type) {
            ToolCommandArgument.$type = markType(ToolCommandArgument, "ToolCommandArgument");
        }
        var coll = new SyncableObservableCollection$2(ToolCommandArgument.$type, ToolCommandArgument.$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 IgcToolCommandArgumentCollection;
}(IgCollection));
export { IgcToolCommandArgumentCollection };
