"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YamlView = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const StaticIpForm_1 = require("../StaticIpForm");
const yamlViewValidationSchema_1 = require("./yamlViewValidationSchema");
const YamlViewFields_1 = require("./YamlViewFields");
const emptyData_1 = require("../../data/emptyData");
const fromInfraEnv_1 = require("../../data/fromInfraEnv");
const common_1 = require("../../../../../../common");
const YamlView = (_a) => {
    var props = tslib_1.__rest(_a, []);
    const { t } = (0, common_1.useTranslation)();
    const formProps = Object.assign(Object.assign({}, props), { validationSchema: (0, yamlViewValidationSchema_1.yamlViewValidationSchema)(t), getInitialValues: (infraEnv) => {
            return (0, fromInfraEnv_1.getYamlViewValues)(infraEnv);
        }, getUpdateParams: (currentInfraEnv, values) => values.hosts, getEmptyValues: () => (0, emptyData_1.getEmptyYamlValues)() });
    return (react_1.default.createElement(StaticIpForm_1.StaticIpForm, Object.assign({}, formProps),
        react_1.default.createElement(YamlViewFields_1.YamlViewFields, null)));
};
exports.YamlView = YamlView;
//# sourceMappingURL=YamlView.js.map