"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const common_1 = require("../../../../common");
const ModalDialogsContext_1 = require("../../hosts/ModalDialogsContext");
const Day2DiscoveryImageModalButton = ({ cluster }) => {
    const { day2DiscoveryImageDialog } = (0, ModalDialogsContext_1.useModalDialogsContext)();
    const { open } = day2DiscoveryImageDialog;
    const { canEdit } = react_1.default.useContext(common_1.AddHostsContext);
    return (react_1.default.createElement(react_core_1.Button, { variant: react_core_1.ButtonVariant.secondary, onClick: () => open({ cluster }), id: `bare-metal-inventory-add-host-button-download-discovery-iso`, isDisabled: !canEdit }, "Add hosts"));
};
exports.default = Day2DiscoveryImageModalButton;
//# sourceMappingURL=Day2DiscoveryImageModalButton.js.map