import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2022-2026 GoodData Corporation
import cx from "classnames";
import { TOOLTIP_WIDTH_MEDIUM, UiTooltip } from "@gooddata/sdk-ui-kit";
export function SelectionModeItem({ item, itemTitle, tooltip, selected, disabled, disabledTooltip, onClick, }) {
    const className = cx("gd-list-item", "selection-kind-dropdown-item", {
        "is-selected": selected,
        "is-disabled": disabled,
    }, "s-selection-mode-dropdown-item", `s-selection-mode-dropdown-item-${item}`);
    const tooltipText = disabled ? disabledTooltip : tooltip;
    return (_jsxs("div", { className: className, onClick: () => !disabled && onClick(), children: [
            _jsx("span", { className: "selection-kind-dropdown-item-title", children: itemTitle }), tooltipText ? (_jsx(UiTooltip, { anchor: _jsx("span", { className: "selection-kind-dropdown-item-help gd-icon-circle-question" }), content: tooltipText, arrowPlacement: "left", triggerBy: ["hover"], width: TOOLTIP_WIDTH_MEDIUM, anchorWrapperStyles: { display: "flex", alignItems: "center" } })) : null] }));
}
