import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2007-2026 GoodData Corporation
import { useEffect, useRef } from "react";
import { FlexDimensions } from "@gooddata/sdk-ui-kit";
import { DraggableInsightListCore } from "./DraggableInsightListCore.js";
export function DraggableInsightList({ recalculateSizeReference, searchAutofocus, enableDescriptions, WrapInsightListItemWithDragComponent, }) {
    const flexRef = useRef(null);
    useEffect(() => {
        flexRef.current?.updateSize();
    }, [recalculateSizeReference]);
    return (_jsx("div", { className: "gd-visualizations-list gd-flex-item-stretch gd-flex-row-container", children: _jsx(FlexDimensions, { ref: flexRef, measureHeight: true, measureWidth: false, className: "visualizations-flex-dimensions", children: _jsx(DraggableInsightListCore, { WrapInsightListItemWithDragComponent: WrapInsightListItemWithDragComponent, searchAutofocus: searchAutofocus, enableDescriptions: enableDescriptions }) }) }));
}
//# sourceMappingURL=DraggableInsightList.js.map