import { invariant as e } from "../../../../../../@react-dnd_invariant@4.0.2/node_modules/@react-dnd/invariant/dist/index.js";
import { END_DRAG as i } from "./types.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.js.map
