import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2020-2025 GoodData Corporation
import { useCallback } from "react";
import cx from "classnames";
export function AttributeUrlSectionItem({ item, onClickHandler, isSelected }) {
    const className = cx("gd-list-item gd-menu-item gd-drill-to-attribute-url-option s-drill-to-attribute-url-option gd-icon-hyperlink-warning", {
        "is-selected": isSelected,
    });
    const onClick = useCallback(() => {
        if (!onClickHandler) {
            return;
        }
        onClickHandler(item);
    }, [item, onClickHandler]);
    return (_jsxs("div", { className: className, onClick: onClick, children: [
            _jsx("span", { className: "gd-parameter-title", children: item.attribute.title }), _jsxs("span", { className: "addon", children: ["(", item.displayForm.title, ")"] })
        ] }));
}
//# sourceMappingURL=AttributeUrlSectionItem.js.map