import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import cx from "classnames";
import { isRichTextWidget, objRefToString } from "@gooddata/sdk-model";
import { OverlayController, OverlayControllerProvider, ScrollablePanel } from "@gooddata/sdk-ui-kit";
import { simplifyText } from "@gooddata/util";
import { DASHBOARD_HEADER_OVERLAYS_Z_INDEX } from "../../../constants/zIndex.js";
import { RichTextFilters } from "./RichTextFilters.js";
const overlayController = OverlayController.getInstance(DASHBOARD_HEADER_OVERLAYS_Z_INDEX);
export function RichTextConfiguration({ widget }) {
    const widgetRefSuffix = isRichTextWidget(widget) ? simplifyText(objRefToString(widget.ref)) : "";
    const classes = cx("configuration-scrollable-panel", "s-configuration-scrollable-panel", `s-rich-text-${widgetRefSuffix}`);
    return (_jsx(ScrollablePanel, { className: classes, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(RichTextFilters, { widget: widget }) }) }));
}
