import { useMemo as t } from "react";
import { useDragDropManager as u } from "../useDragDropManager.js";
import { useIsomorphicLayoutEffect as c } from "../useIsomorphicLayoutEffect.js";
import { SourceConnector as m } from "../../internals/SourceConnector.js";
function g(o, e) {
  const n = u(), r = t(
    () => new m(n.getBackend()),
    [
      n
    ]
  );
  return c(() => (r.dragSourceOptions = o || null, r.reconnect(), () => r.disconnectDragSource()), [
    r,
    o
  ]), c(() => (r.dragPreviewOptions = e || null, r.reconnect(), () => r.disconnectDragPreview()), [
    r,
    e
  ]), r;
}
export {
  g as useDragSourceConnector
};
//# sourceMappingURL=useDragSourceConnector.js.map
