import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2021-2026 GoodData Corporation
import { FormattedMessage } from "react-intl";
import { Bubble } from "../../../Bubble/Bubble.js";
import { BubbleHoverTrigger } from "../../../Bubble/BubbleHoverTrigger.js";
import { useComponentLabelsContext } from "./ComponentLabelsContext.js";
const alignPoints = [{ align: "cr cl" }];
export function GranteeUserIcon() {
    return (_jsx("div", { className: "gd-grantee-item-icon-left-background", children: _jsx("span", { className: "gd-grantee-item-icon gd-grantee-icon-user gd-grantee-item-icon-left" }) }));
}
export function GranteeUserInactiveIcon() {
    return (_jsx("div", { className: "gd-grantee-item-icon-left-background", children: _jsx("span", { className: "gd-grantee-item-icon-inactive gd-grantee-icon-user gd-grantee-item-icon-left" }) }));
}
export function GranteeGroupIcon() {
    return (_jsx("div", { className: "gd-grantee-item-icon-left-background", children: _jsx("span", { className: "gd-grantee-item-icon gd-grantee-icon-group gd-grantee-item-icon-left" }) }));
}
export function GranteeRemoveIcon({ onClick, mode }) {
    const labels = useComponentLabelsContext();
    return (_jsxs(BubbleHoverTrigger, { showDelay: 0, hideDelay: 0, className: "gd-grantee-item-delete", children: [
            _jsx("span", { className: "gd-grantee-item-icon gd-grantee-icon-trash gd-grantee-item-icon-right s-gd-grantee-item-delete", onClick: onClick, "aria-label": "Share dialog grantee delete" }), _jsx(Bubble, { className: "bubble-primary", alignPoints: alignPoints, children: mode === "ShareGrantee" ? (_jsxs(_Fragment, { children: [" ", labels.removeAccessGranteeTooltip, " "] })) : (_jsx(FormattedMessage, { id: "shareDialog.share.grantee.item.remove.selection" })) })
        ] }));
}
export function GranteeOwnerRemoveIcon() {
    const labels = useComponentLabelsContext();
    return (_jsxs(BubbleHoverTrigger, { showDelay: 0, hideDelay: 0, className: "gd-grantee-item-delete-owner", children: [
            _jsx("span", { className: "gd-grantee-item-icon gd-grantee-item-icon-owner gd-grantee-item-icon-right", children: _jsx(FormattedMessage, { id: "shareDialog.share.grantee.item.creator" }) }), _jsx(Bubble, { className: "bubble-primary", alignPoints: alignPoints, children: labels.removeAccessCreatorTooltip })
        ] }));
}
