import e, { memo as m, useState as d, useEffect as a } from "react";
import { HTML5Backend as l } from "../../../../../react-dnd-html5-backend/dist/esm/index.es.js";
import { DndProvider as p } from "../../../../../react-dnd/dist/core/DndProvider.es.js";
const c = m(({ id: t, children: n }) => {
  const [r, o] = d(null);
  return a(() => {
    o(document.getElementById(t));
  }, [t]), r ? /* @__PURE__ */ e.createElement(p, {
    backend: l,
    options: { rootElement: r }
  }, n) : /* @__PURE__ */ e.createElement(e.Fragment, null);
});
c.displayName = "DndWrapper";
export {
  c as DndWrapper
};
//# sourceMappingURL=DndWrapper.es.es.js.map
