import { Arr } from '@ephox/katamari';
import * as KeyMatch from './KeyMatch';
const basic = (key, action) => ({
    matches: KeyMatch.is(key),
    classification: action
});
const rule = (matches, action) => ({
    matches,
    classification: action
});
const choose = (transitions, event) => {
    const transition = Arr.find(transitions, (t) => t.matches(event));
    return transition.map((t) => t.classification);
};
export { basic, rule, choose };
//# sourceMappingURL=KeyRules.js.map