import{aI as o,ao as n}from"./app-k0jcl5PQ.js";import{h as x,f as y}from"./DwvfEevL.chunk.js";function h(e){const{active:a,isDragging:r,attributes:s,listeners:b,setNodeRef:c}=x({...e.draggable,disabled:!e.draggable,attributes:{role:"drag",tabIndex:-1}}),{isOver:u,over:d,active:f,setNodeRef:D}=y({...e.droppable,disabled:!e.droppable});o.useEffect(()=>{var i,l,g;const t=(i=e.draggable)==null?void 0:i.data;Array.isArray(t)&&(t!=null&&t.includes(a==null?void 0:a.id.toString()))?(l=e.setIsDragging)==null||l.call(e,r):(g=e.setIsDragging)==null||g.call(e,!1)},[r]);function m(){var i;const t=(i=e.draggable)==null?void 0:i.data;return Array.isArray(t)&&t.includes(e.draggable.id.toString())}return n.jsx("div",{ref:c,...b,...s,className:`${e.draggable?"cursor-grab":"cursor-default"} ${r&&a||e.isDragging&&m()?e.dragStyle:null}`,children:n.jsx("div",{ref:D,className:f&&u&&(a==null?void 0:a.id)!==(d==null?void 0:d.id)?e.dropStye:null,children:e.children})})}export{h as D};
//# sourceMappingURL=CofWDDSQ.chunk.js.map
