import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2020-2026 GoodData Corporation
import cx from "classnames";
import { DashboardItem } from "../../../presentationComponents/DashboardItems/DashboardItem.js";
import { DashboardItemBase } from "../../../presentationComponents/DashboardItems/DashboardItemBase.js";
import { useWidgetHighlighting } from "../../common/useWidgetHighlighting.js";
import { DashboardRichText } from "../../richText/DashboardRichText.js";
/**
 * @internal
 */
export function DefaultDashboardRichTextWidget({ widget, screen, dashboardItemClasses, }) {
    const { elementRef, highlighted } = useWidgetHighlighting(widget);
    return (_jsx(DashboardItem, { className: cx(dashboardItemClasses, "type-rich-text", "gd-dashboard-view-widget", {
            "gd-highlighted": highlighted,
        }), screen: screen, ref: elementRef, children: _jsx(DashboardItemBase, { visualizationClassName: "gd-rich-text-widget-wrapper", children: () => _jsx(DashboardRichText, { widget: widget }) }) }));
}
