import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2025 GoodData Corporation
import { Bubble, BubbleHoverTrigger, UiIconButton } from "@gooddata/sdk-ui-kit";
import { bem } from "../../notificationsPanel/bem.js";
const { b, e } = bem("gd-ui-ext-automation-icon-tooltip");
function AutomationIconTooltipCore({ header, content, sections, }) {
    return (_jsxs("div", { className: b(), children: [
            _jsxs("div", { children: [
                    _jsx("div", { className: e("header"), children: header }), content ? _jsx("div", { className: e("content-header"), children: content }) : null] }), sections.map((section, index) => (_jsxs("div", { children: [
                    _jsx("div", { className: e("sub-header"), children: section.header.toUpperCase() }), section.content ? (section.icon ? (_jsxs("div", { className: e("content"), children: [
                            _jsx("div", { className: e("content-inner-truncated"), children: section.content }), _jsx("div", { className: e("icon-button"), children: _jsx(UiIconButton, { icon: section.icon, size: "xsmall", variant: "tertiary", onClick: section.onIconClick }) })
                        ] })) : (_jsx("div", { className: e("content"), children: section.content }))) : null] }, index)))] }));
}
export function AutomationIconTooltip({ header, content, sections, children, align, }) {
    const alignPoints = align ? [{ align }] : undefined;
    return (_jsxs(BubbleHoverTrigger, { hideDelay: 300, eventsOnBubble: true, children: [children, _jsx(Bubble, { className: "bubble-light", alignPoints: alignPoints, arrowStyle: { display: "none" }, children: _jsx(AutomationIconTooltipCore, { header: header, content: content, sections: sections }) })
        ] }));
}
//# sourceMappingURL=AutomationIconTooltip.js.map