"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const use_translation_wrapper_1 = require("../../hooks/use-translation-wrapper");
const EditHostForm_1 = tslib_1.__importDefault(require("./EditHostForm"));
const react_core_1 = require("@patternfly/react-core");
const EditHostModal = ({ isOpen, host, inventory, usedHostnames, onClose, onSave, onHostSaveError, getEditErrorMessage, }) => {
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    if (!host || !inventory) {
        return null;
    }
    return (react_1.default.createElement(react_core_1.Modal, { "aria-label": "Change hostname dialog", isOpen: isOpen, onClose: onClose, variant: react_core_1.ModalVariant.small },
        react_1.default.createElement(react_core_1.ModalHeader, { title: t('ai:Change hostname') }),
        react_1.default.createElement(EditHostForm_1.default, { host: host, inventory: inventory, usedHostnames: usedHostnames, onCancel: onClose, onSave: onSave, getEditErrorMessage: getEditErrorMessage, onHostSaveError: onHostSaveError })));
};
exports.default = EditHostModal;
//# sourceMappingURL=EditHostModal.js.map