"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ManagedNetworkingControlGroup = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const ui_1 = require("../../ui");
const RadioFieldWithTooltip_1 = tslib_1.__importDefault(require("../../ui/formik/RadioFieldWithTooltip"));
const use_translation_wrapper_1 = require("../../../hooks/use-translation-wrapper");
const GROUP_NAME = 'managedNetworkingType';
const ManagedNetworkingControlGroup = ({ disabled = false, tooltipCmnDisabled, tooltipUmnDisabled, }) => {
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    const tooltipPropsCmn = {
        hidden: !tooltipCmnDisabled || !disabled,
        content: tooltipCmnDisabled,
        position: 'top',
    };
    const tooltipPropsUmn = {
        hidden: !tooltipUmnDisabled || !disabled,
        content: tooltipUmnDisabled,
        position: 'top',
    };
    return (react_1.default.createElement(react_core_1.FormGroup, { label: t('ai:Network Management'), fieldId: (0, ui_1.getFieldId)(GROUP_NAME, 'radio'), isInline: true },
        react_1.default.createElement(react_core_1.Split, null,
            react_1.default.createElement(react_core_1.SplitItem, null,
                react_1.default.createElement(RadioFieldWithTooltip_1.default, { tooltipProps: tooltipPropsCmn, name: GROUP_NAME, isDisabled: disabled, value: 'clusterManaged', label: t('ai:Cluster-Managed Networking') }))),
        react_1.default.createElement(react_core_1.Split, null,
            react_1.default.createElement(react_core_1.SplitItem, null,
                react_1.default.createElement(RadioFieldWithTooltip_1.default, { tooltipProps: tooltipPropsUmn, name: GROUP_NAME, isDisabled: disabled, value: 'userManaged', label: react_1.default.createElement(react_1.default.Fragment, null,
                        react_1.default.createElement("span", null, t('ai:User-Managed networking')),
                        ' ',
                        react_1.default.createElement(ui_1.PopoverIcon, { bodyContent: t("ai:With User-Managed networking, you'll need to provide and configure a load balancer for the API and ingress endpoints.") })) })))));
};
exports.ManagedNetworkingControlGroup = ManagedNetworkingControlGroup;
//# sourceMappingURL=ManagedNetworkingControlGroup.js.map