import { invariant as n } from "../../../../@react-dnd/invariant/dist/index.es.js";
import { useCollectedProps as c } from "../useCollectedProps.es.js";
import { useOptionalFactory as s } from "../useOptionalFactory.es.js";
import { useConnectDragSource as p, useConnectDragPreview as a } from "./connectors.es.js";
import { useDragSourceConnector as m } from "./useDragSourceConnector.es.js";
import { useDragSourceMonitor as u } from "./useDragSourceMonitor.es.js";
import { useRegisteredDragSource as g } from "./useRegisteredDragSource.es.js";
function w(t, i) {
  const e = s(t, i);
  n(!e.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
  const r = u(), o = m(e.options, e.previewOptions);
  return g(e, r, o), [
    c(e.collect, r, o),
    p(o),
    a(o)
  ];
}
export {
  w as useDrag
};
//# sourceMappingURL=useDrag.es.js.map
