import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2023-2025 GoodData Corporation
import cx from "classnames";
import { Bubble, BubbleHoverTrigger } from "@gooddata/sdk-ui-kit";
import { CalculationListItemInfo } from "./CalculationListItemInfo.js";
import { HIDE_DELAY_DEFAULT, SHOW_DELAY_DEFAULT } from "../../../../constants/bubble.js";
const BUBBLE_INFO_ALIGN_POINTS = [{ align: "cr cl" }];
const BUBBLE_INFO_ARROW_OFFSETS = { "cr cl": [15, 0] };
export function CalculationListItem({ title, icon, info, isSelected, onClick }) {
    const classNames = cx(["gd-list-item", "calculation-list-item", "s-calculation-list-item", `s-${title}`], {
        "is-selected": isSelected,
    });
    return (_jsxs("div", { className: classNames, onClick: onClick, children: [_jsx("span", { className: `gd-list-icon ${icon}` }), _jsx("span", { children: title }), _jsx("div", { role: "item-info", className: "gd-list-item-bubble s-list-item-info", children: _jsxs(BubbleHoverTrigger, { tagName: "div", showDelay: SHOW_DELAY_DEFAULT, hideDelay: HIDE_DELAY_DEFAULT, children: [_jsx("div", { className: "inlineBubbleHelp" }), _jsx(Bubble, { className: "bubble-light adi-arithmetic-measure-operand-bubble calculation-list-item-bubble s-calculation-list-item-bubble", alignPoints: BUBBLE_INFO_ALIGN_POINTS, arrowOffsets: BUBBLE_INFO_ARROW_OFFSETS, children: _jsx(CalculationListItemInfo, { title: title, calculationType: info }) })] }) })] }));
}
//# sourceMappingURL=CalculationListItem.js.map