import { jsx as _jsx } from "react/jsx-runtime";
import { useDashboardDrag } from "./useDashboardDrag.js";
/**
 * Drag source wrapper for filter-bar chips.
 *
 * @internal
 */
export function DraggableChipSource({ dragItem, canDrag, children }) {
    const [{ isDragging }, dragRef] = useDashboardDrag({ dragItem, canDrag }, [dragItem.type, canDrag]);
    return (_jsx("div", { className: isDragging ? "is-dragging" : undefined, ref: (el) => {
            dragRef(el);
        }, children: children }));
}
//# sourceMappingURL=DraggableChipSource.js.map