export var FileType;
(function (FileType) {
    FileType["Directory"] = "Directory";
    FileType["Text"] = "Text";
})(FileType || (FileType = {}));
var GitProviderWrapper = /** @class */ (function () {
    function GitProviderWrapper(git) {
        this.git = git;
    }
    GitProviderWrapper.prototype.baseEntries = function (oid) {
        return new AsyncIteratorWrapper(this.git.baseEntries(oid)[Symbol.asyncIterator]());
    };
    GitProviderWrapper.prototype.baseText = function (oid, path) {
        return this.git.baseText(oid, path);
    };
    return GitProviderWrapper;
}());
export { GitProviderWrapper };
var AsyncIteratorWrapper = /** @class */ (function () {
    function AsyncIteratorWrapper(iterator) {
        this.iterator = iterator;
    }
    AsyncIteratorWrapper.prototype.next = function () {
        return this.iterator.next();
    };
    return AsyncIteratorWrapper;
}());
export { AsyncIteratorWrapper };
var ChangeObserver = /** @class */ (function () {
    function ChangeObserver() {
        this.callbacks = new Map();
    }
    ChangeObserver.prototype.onChange = function (bufferId, callback) {
        var callbacks = this.callbacks.get(bufferId);
        if (!callbacks) {
            callbacks = [];
            this.callbacks.set(bufferId, callbacks);
        }
        callbacks.push(callback);
    };
    ChangeObserver.prototype.textChanged = function (bufferId, changes) {
        var callbacks = this.callbacks.get(bufferId);
        if (callbacks) {
            for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
                var callback = callbacks_1[_i];
                callback(changes);
            }
        }
    };
    return ChangeObserver;
}());
export { ChangeObserver };
