import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2020-2026 GoodData Corporation
import { useMemo } from "react";
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
/**
 * @internal
 */
export function ShowAsTableButton(props) {
    const { widget } = props;
    const { ShowAsTableButtonComponentProvider } = useDashboardComponentsContext();
    const ShowAsTableButtonComponent = useMemo(() => ShowAsTableButtonComponentProvider(widget), [ShowAsTableButtonComponentProvider, widget]);
    return _jsx(ShowAsTableButtonComponent, { ...props });
}
