import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import cx from "classnames";
import { simplifyText } from "@gooddata/util";
export function ConnectingAttributeItem({ title, icon, selected, onClick }) {
    const handleOnClick = (e) => {
        onClick();
        e.preventDefault();
    };
    const className = cx("gd-list-item", `s-${simplifyText(title)}`, {
        "is-selected": selected,
    });
    return (_jsxs("div", { className: className, onClick: handleOnClick, children: [
            _jsx("span", { className: cx("gd-list-icon", icon) }), _jsx("span", { children: title })
        ] }));
}
