import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import { useIntl } from "react-intl";
import { UiIcon } from "../../UiIcon/UiIcon.js";
import { UiLink } from "../../UiLink/UiLink.js";
import { getTypedUiTabsContextStore } from "../context.js";
import { messages } from "../messages.js";
/**
 * @internal
 */
export function DefaultUiTabsTabActionsButton({ tab, onClick, ariaAttributes, tabIndex, id, }) {
    const intl = useIntl();
    const store = getTypedUiTabsContextStore();
    const { size } = store.useContextStoreValues(["size"]);
    if ((tab.actions ?? []).length === 0) {
        return null;
    }
    return (_jsx(UiLink, { variant: "secondary", role: "button", "aria-label": intl.formatMessage(messages["actions"]), ...ariaAttributes, onClick: onClick, tabIndex: tabIndex, id: id, dataTestId: "s-tab-actions", children: _jsx(UiIcon, { type: "ellipsisVertical", size: size === "large" ? 18 : 14, layout: "block", color: "complementary-5" }) }));
}
