"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecondaryActions = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const DotsOutlineMd_1 = require("../../../icons/DotsOutlineMd");
const IconDropdownButton_1 = require("../../IconDropdownButton");
const ListItemButton_1 = require("../../ListItemButton");
const ListItemText_1 = require("../../ListItemText");
const TOOLTIP_PLACEMENT = 'right';
const SecondaryActions = ({ actions, isDisabled, className, size, }) => {
    if (!actions.length) {
        return null;
    }
    return ((0, jsx_runtime_1.jsx)(IconDropdownButton_1.IconDropdownButton, { disabled: isDisabled, icon: (0, jsx_runtime_1.jsx)(DotsOutlineMd_1.DotsOutlineMd, {}), variant: "outlined", color: "grey", size: size, className: className, children: actions.map(({ text, ...secondaryProps }) => ((0, react_1.createElement)(ListItemButton_1.ListItemButton, { tooltipPlacement: TOOLTIP_PLACEMENT, ...secondaryProps, key: text },
            (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: text })))) }));
};
exports.SecondaryActions = SecondaryActions;
