import { REMOVE_SOURCE as c, REMOVE_TARGET as E, ADD_TARGET as i, ADD_SOURCE as m } from "../actions/registry.js";
import { NONE as o, ALL as p } from "../utils/dirtiness.js";
import { areArraysEqual as R } from "../utils/equality.js";
import { xor as d } from "../utils/js_utils.js";
import { DROP as f, END_DRAG as u, PUBLISH_DRAG_SOURCE as g, BEGIN_DRAG as A, HOVER as D } from "../actions/dragDrop/types.js";
function C(_ = o, n) {
  switch (n.type) {
    case D:
      break;
    case m:
    case i:
    case E:
    case c:
      return o;
    case A:
    case g:
    case u:
    case f:
    default:
      return p;
  }
  const { targetIds: e = [], prevTargetIds: r = [] } = n.payload, t = d(e, r);
  if (!(t.length > 0 || !R(e, r)))
    return o;
  const s = r[r.length - 1], a = e[e.length - 1];
  return s !== a && (s && t.push(s), a && t.push(a)), t;
}
export {
  C as reduce
};
//# sourceMappingURL=dirtyHandlerIds.js.map
