import { jsx as _jsx } from "react/jsx-runtime";
import { useIntl } from "react-intl";
import { forwardRefWithGenerics } from "@gooddata/sdk-ui";
import { useMediaQuery } from "../../../responsive/useMediaQuery.js";
import { UiButton } from "../../UiButton/UiButton.js";
import { UiIconButton } from "../../UiIconButton/UiIconButton.js";
import { messages } from "../messages.js";
function DefaultUiTabsAllTabsButtonNotWrapped({ isOpen, onClick }, ref) {
    const intl = useIntl();
    const isMobile = useMediaQuery("mobileDevice");
    return isMobile ? (_jsx(UiIconButton, { icon: isOpen ? "navigateUp" : "navigateDown", variant: "tertiary", label: intl.formatMessage(messages["all"]), accessibilityConfig: {
            ariaLabel: intl.formatMessage(messages["showAllTabs"]),
            ariaExpanded: isOpen,
        }, onClick: onClick, ref: ref, disableAnimation: true })) : (_jsx(UiButton, { label: intl.formatMessage(messages["all"]), iconAfter: isOpen ? "navigateUp" : "navigateDown", variant: "tertiary", accessibilityConfig: {
            ariaLabel: intl.formatMessage(messages["showAllTabs"]),
            ariaExpanded: isOpen,
        }, onClick: onClick, ref: ref, disableIconAnimation: true }));
}
/**
 * @internal
 */
export const DefaultUiTabsAllTabsButton = forwardRefWithGenerics(DefaultUiTabsAllTabsButtonNotWrapped);
