function* maybeSplitAndPushEditChange(change, predicate, output, pusher) {
  const oldWasPresent = predicate(change.oldNode.row);
  const newIsPresent = predicate(change.node.row);
  if (oldWasPresent && newIsPresent) {
    yield* output.push(change, pusher);
  } else if (oldWasPresent && !newIsPresent) {
    yield* output.push(
      {
        type: "remove",
        node: change.oldNode
      },
      pusher
    );
  } else if (!oldWasPresent && newIsPresent) {
    yield* output.push(
      {
        type: "add",
        node: change.node
      },
      pusher
    );
  }
}
export {
  maybeSplitAndPushEditChange
};
//# sourceMappingURL=maybe-split-and-push-edit-change.js.map
