import React, { forwardRef } from 'react';
import { DragOverlay, } from '@wix/wix-style-react-incubator/dnd-kit/core';
import { createPortal } from 'react-dom';
import { restrictToWindowEdges } from '@wix/wix-style-react-incubator/dnd-kit/modifiers';
import { observer } from 'mobx-react-lite';
import { usePageContext } from '@wix/bex-core/react';
import { KanbanDragOverlayCardItem } from './KanbanDragOverlayCardItem';
const KanbanDragOverlayWrapper = forwardRef((props, ref) => React.createElement("div", { "data-hook": "kanban-drag-overlay", ref: ref, ...props }));
function _KanbanDragOverlay(props) {
    const { state, renderItem, actionCell, dataExtension, tags } = props;
    const { modalsContainerRef } = usePageContext();
    return createPortal(React.createElement(DragOverlay, { modifiers: [restrictToWindowEdges], wrapperElement: KanbanDragOverlayWrapper },
        React.createElement(KanbanDragOverlayCardItem, { state: state, renderItem: renderItem, actionCell: actionCell, dataExtension: dataExtension, tags: tags })), modalsContainerRef?.current ?? document.body);
}
export const KanbanDragOverlay = observer(_KanbanDragOverlay);
//# sourceMappingURL=KanbanDragOverlay.js.map