import { areCoordsEqual as l } from "../utils/equality.es.js";
import { DROP as c, END_DRAG as u, HOVER as O, BEGIN_DRAG as a, INIT_COORDS as o } from "../actions/dragDrop/types.es.js";
function s(t, n, e) {
  return n in t ? Object.defineProperty(t, n, {
    value: e,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[n] = e, t;
}
function p(t) {
  for (var n = 1; n < arguments.length; n++) {
    var e = arguments[n] != null ? arguments[n] : {}, f = Object.keys(e);
    typeof Object.getOwnPropertySymbols == "function" && (f = f.concat(Object.getOwnPropertySymbols(e).filter(function(r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    }))), f.forEach(function(r) {
      s(t, r, e[r]);
    });
  }
  return t;
}
const i = {
  initialSourceClientOffset: null,
  initialClientOffset: null,
  clientOffset: null
};
function d(t = i, n) {
  const { payload: e } = n;
  switch (n.type) {
    case o:
    case a:
      return {
        initialSourceClientOffset: e.sourceClientOffset,
        initialClientOffset: e.clientOffset,
        clientOffset: e.clientOffset
      };
    case O:
      return l(t.clientOffset, e.clientOffset) ? t : p({}, t, {
        clientOffset: e.clientOffset
      });
    case u:
    case c:
      return i;
    default:
      return t;
  }
}
export {
  d as reduce
};
//# sourceMappingURL=dragOffset.es.js.map
