import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import cx from "classnames";
import noop from "lodash-es/noop.js";
import { useIntl } from "react-intl";
import { RawChart } from "@gooddata/sdk-ui-charts/internal";
import { UiSkeleton, useElementSize } from "@gooddata/sdk-ui-kit";
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
import { useDrillAttributeHandler } from "../composition/hooks/useDrillAttributeHandler.js";
export function KdaKeyDriverChart({ config, dataView, displayForm }) {
    const intl = useIntl();
    const theme = useTheme();
    const { ref, width, height } = useElementSize();
    const { onDrillCallback } = useDrillAttributeHandler();
    return (_jsx("div", { className: cx("gd-kda-key-drivers-detail-visualisation-container"), ref: ref, children: config && dataView ? (_jsx(RawChart, { type: "combo", locale: intl.locale, width: width, height: height, config: config, dataView: dataView, drillableItems: displayForm ? [displayForm] : [], onDrill: onDrillCallback, onLegendReady: noop, afterRender: noop, onDataTooLarge: noop, onNegativeValues: noop, theme: theme })) : (_jsx(UiSkeleton, { itemWidth: width, itemHeight: height })) }));
}
//# sourceMappingURL=KdaKeyDriverChart.js.map