import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { Button, Text } from '@gravity-ui/uikit';
import { isActionConfig } from "../../../utils/actionUtils.js";
import { block } from "../../../utils/cn.js";
import { Loader } from "../../atoms/Loader/index.js";
import { Shimmer } from "../../atoms/Shimmer/index.js";
import { ButtonGroup } from "../ButtonGroup/index.js";
import "./ToolFooter.css";
const b = block('tool-footer');
export function ToolFooter({ actions, content, showLoader = true, className, qa }) {
    return (_jsxs("div", { className: b('', className), "data-qa": qa, children: [_jsxs("div", { className: b('left'), children: [showLoader && _jsx(Loader, { view: "loading", size: "xs" }), content && (_jsx(Shimmer, { children: _jsx(Text, { children: content }) }))] }), _jsx(ButtonGroup, { children: actions.map((action, index) => {
                    if (!isActionConfig(action)) {
                        return _jsx(React.Fragment, { children: action }, index);
                    }
                    return (_jsx(Button, { view: action.view, onClick: action.onClick, size: "s", children: action.label }, index));
                }) })] }));
}
//# sourceMappingURL=index.js.map
