"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolFooter = ToolFooter;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = tslib_1.__importDefault(require("react"));
const uikit_1 = require("@gravity-ui/uikit");
const actionUtils_1 = require("../../../utils/actionUtils.js");
const cn_1 = require("../../../utils/cn.js");
const Loader_1 = require("../../atoms/Loader/index.js");
const Shimmer_1 = require("../../atoms/Shimmer/index.js");
const ButtonGroup_1 = require("../ButtonGroup/index.js");
require("./ToolFooter.css");
const b = (0, cn_1.block)('tool-footer');
function ToolFooter({ actions, content, showLoader = true, className, qa }) {
    return ((0, jsx_runtime_1.jsxs)("div", { className: b('', className), "data-qa": qa, children: [(0, jsx_runtime_1.jsxs)("div", { className: b('left'), children: [showLoader && (0, jsx_runtime_1.jsx)(Loader_1.Loader, { view: "loading", size: "xs" }), content && ((0, jsx_runtime_1.jsx)(Shimmer_1.Shimmer, { children: (0, jsx_runtime_1.jsx)(uikit_1.Text, { children: content }) }))] }), (0, jsx_runtime_1.jsx)(ButtonGroup_1.ButtonGroup, { children: actions.map((action, index) => {
                    if (!(0, actionUtils_1.isActionConfig)(action)) {
                        return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: action }, index);
                    }
                    return ((0, jsx_runtime_1.jsx)(uikit_1.Button, { view: action.view, onClick: action.onClick, size: "s", children: action.label }, index));
                }) })] }));
}
//# sourceMappingURL=index.js.map
