"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_core_1 = require("@patternfly/react-core");
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
const MassApproveAction = ({ onApprove, selectedAgents }) => {
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    const disabledDescription = selectedAgents.every((a) => a.spec.approved)
        ? t('ai:All selected hosts are already approved.')
        : undefined;
    return (React.createElement(react_core_1.DropdownItem, { onClick: onApprove, isDisabled: !!disabledDescription, description: disabledDescription }, t('ai:Approve')));
};
exports.default = MassApproveAction;
//# sourceMappingURL=MassApproveAction.js.map