import { jsx as _jsx } from "react/jsx-runtime";
import { useWidgetSelection } from "../../../model/react/useWidgetSelection.js";
/**
 * @internal
 */
export function DraggableInsightListItem(props) {
    const { ListItemComponent, listItemComponentProps, insight } = props;
    const WrapInsightListItemWithDragComponent = props.WrapInsightListItemWithDragComponent;
    const { deselectWidgets } = useWidgetSelection();
    return (_jsx(WrapInsightListItemWithDragComponent, { insight: insight, onDragStart: () => deselectWidgets(), children: _jsx(ListItemComponent, { ...listItemComponentProps }) }));
}
