"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const common_1 = require("../../../common");
const wizardTransition_1 = require("../clusterWizard/wizardTransition");
const AdditionaNTPSourceDialogToggle_1 = require("./AdditionaNTPSourceDialogToggle");
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
const NetworkingStatus = (props) => {
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    const networkingStatus = (0, common_1.getWizardStepHostStatus)('networking', wizardTransition_1.wizardStepsValidationsMap, props.host);
    const status = (0, common_1.hostStatus)(t)[networkingStatus];
    const validationsInfo = (0, common_1.getWizardStepHostValidationsInfo)(props.validationsInfo, 'networking', wizardTransition_1.wizardStepsValidationsMap);
    const sublabel = (0, common_1.areOnlySoftValidationsOfWizardStepFailing)(validationsInfo, 'networking', wizardTransition_1.wizardStepsValidationsMap)
        ? 'Some validations failed'
        : undefined;
    return (react_1.default.createElement(common_1.HostStatus, Object.assign({}, props, { status: Object.assign(Object.assign({}, status), { sublabel }), validationsInfo: validationsInfo, AdditionalNTPSourcesDialogToggleComponent: AdditionaNTPSourceDialogToggle_1.AdditionalNTPSourcesDialogToggle })));
};
exports.default = NetworkingStatus;
//# sourceMappingURL=NetworkingStatus.js.map