var KeyboardActionExctracterBuilder = /** @class */ (function () {
    function KeyboardActionExctracterBuilder(actionMatchers) {
        if (actionMatchers === void 0) { actionMatchers = []; }
        this._actionMatchers = actionMatchers;
    }
    KeyboardActionExctracterBuilder.prototype.add = function (type, check) {
        return new KeyboardActionExctracterBuilder(this._actionMatchers.concat({ type: type, check: check }));
    };
    KeyboardActionExctracterBuilder.prototype.build = function (defaultAction) {
        var _this = this;
        return function (event) {
            var action = _this._actionMatchers.find(function (x) { return x.check(event); });
            return (action && action.type) || defaultAction;
        };
    };
    return KeyboardActionExctracterBuilder;
}());
export { KeyboardActionExctracterBuilder };
//# sourceMappingURL=extractKeyboardAction.js.map