import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2022-2026 GoodData Corporation
import { renderModeAware } from "../../componentDefinition/renderModeAware.js";
import { EditModeDashboardInsight } from "./EditModeDashboardInsight/EditModeDashboardInsight.js";
import { ExportModeDashboardInsight } from "./ExportModeDashboardInsight/ExportModeDashboardInsight.js";
import { useBackendWithInsightWidgetCorrelation } from "./useBackendWithInsightWidgetCorrelation.js";
import { ViewModeDashboardInsight } from "./ViewModeDashboardInsight/ViewModeDashboardInsight.js";
/**
 * @internal
 */
const DefaultDashboardInsightInner = renderModeAware({
    view: ViewModeDashboardInsight,
    edit: EditModeDashboardInsight,
    export: ExportModeDashboardInsight,
});
/**
 * Default implementation of the Dashboard Insight widget.
 *
 * @public
 */
export function DefaultDashboardInsight(props) {
    const backend = useBackendWithInsightWidgetCorrelation(props);
    return _jsx(DefaultDashboardInsightInner, { ...props, backend: backend });
}
