import { invariant as e } from "../../../../@react-dnd/invariant/dist/index.es.js";
import { END_DRAG as i } from "./types.es.js";
function D(r) {
  return function() {
    const n = r.getMonitor(), o = r.getRegistry();
    g(n);
    const t = n.getSourceId();
    return t != null && (o.getSource(t, !0).endDrag(n, t), o.unpinSource()), {
      type: i
    };
  };
}
function g(r) {
  e(r.isDragging(), "Cannot call endDrag while not dragging.");
}
export {
  D as createEndDrag
};
//# sourceMappingURL=endDrag.es.js.map
