import { __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { ActionTooltip, Button } from '@gravity-ui/uikit';
/**
 * ActionButton component combines Button with ActionTooltip
 *
 * This component wraps a Button inside an ActionTooltip, providing
 * a convenient way to add tooltips to action buttons throughout the application.
 *
 * @param props - Component props
 * @param ref - Forwarded ref to the button element
 * @returns ActionButton component
 */
export const ActionButton = React.forwardRef((_a, ref) => {
    var { tooltipTitle, tooltipPlacement, tooltipDisabled, tooltipOpenDelay, tooltipCloseDelay, wrapperClassName, className, children } = _a, buttonProps = __rest(_a, ["tooltipTitle", "tooltipPlacement", "tooltipDisabled", "tooltipOpenDelay", "tooltipCloseDelay", "wrapperClassName", "className", "children"]);
    const button = (_jsx(Button, Object.assign({}, buttonProps, { ref: ref, className: className, children: children })));
    // If no tooltip props provided, return button without tooltip
    if (!tooltipTitle) {
        return button;
    }
    return (_jsx(ActionTooltip, { title: tooltipTitle, placement: tooltipPlacement, disabled: tooltipDisabled, openDelay: tooltipOpenDelay, closeDelay: tooltipCloseDelay, className: wrapperClassName, children: button }));
});
ActionButton.displayName = 'ActionButton';
//# sourceMappingURL=ActionButton.js.map
