"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 formik_1 = require("formik");
const services_1 = require("../../../services");
const common_1 = require("../../../../common");
const GROUP_NAME = 'hostsNetworkConfigurationType';
const Day2HostStaticIpConfigurations = ({ isDisabled }) => {
    const { setFieldValue } = (0, formik_1.useFormikContext)();
    const onChangeNetworkType = (event) => {
        setFieldValue('hostsNetworkConfigurationType', event.target.value);
    };
    return (react_1.default.createElement(react_core_1.FormGroup, { label: react_1.default.createElement(react_core_1.Content, { component: react_core_1.ContentVariants.h4 }, "Hosts' network configuration"), fieldId: (0, common_1.getFieldId)(GROUP_NAME, 'radio'), isInline: true, onChange: onChangeNetworkType },
        react_1.default.createElement(react_core_1.Tooltip, { hidden: !isDisabled, content: "This cluster is using the Oracle cloud platform which allows only DHCP for the hosts' network configuration" },
            react_1.default.createElement(react_core_1.Flex, null,
                react_1.default.createElement(react_core_1.FlexItem, { key: services_1.HostsNetworkConfigurationType.DHCP },
                    react_1.default.createElement(common_1.RadioField, { name: GROUP_NAME, value: services_1.HostsNetworkConfigurationType.DHCP, label: "DHCP only", isDisabled: isDisabled })),
                react_1.default.createElement(react_core_1.FlexItem, { key: services_1.HostsNetworkConfigurationType.STATIC },
                    react_1.default.createElement(common_1.RadioField, { name: GROUP_NAME, value: services_1.HostsNetworkConfigurationType.STATIC, label: "Static IP, bridges, and bonds", isDisabled: isDisabled }))))));
};
exports.default = Day2HostStaticIpConfigurations;
//# sourceMappingURL=Day2StaticIpHostConfigurations.js.map