import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2024-2026 GoodData Corporation
import { useIntl } from "react-intl";
import { UiSubmenuHeader } from "@gooddata/sdk-ui-kit";
import { InsightList } from "../../../insightList/InsightList.js";
export function InsightPicker({ onInsightSelect, onBack }) {
    const intl = useIntl();
    return (_jsxs("div", { className: "visualization-picker", children: [
            _jsx(UiSubmenuHeader, { title: intl.formatMessage({
                    id: "visualizationSwitcherToolbar.visualizationsList.add",
                }), onBack: onBack, height: "large" }), _jsx("div", { className: "open-visualizations s-open-visualizations", children: _jsx(InsightList, { height: 270, width: 240, searchAutofocus: true, onSelect: (insight) => {
                        onInsightSelect(insight);
                    } }) })
        ] }));
}
//# sourceMappingURL=InsightPicker.js.map