"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const core_1 = require("@material-ui/core");
const UIFormControlLabel_1 = require("./UIFormControlLabel");
const UIRadioButton_1 = require("./UIRadioButton");
const UIRadioGroup = (props) => {
    return ((0, jsx_runtime_1.jsx)(core_1.RadioGroup, { value: props.value, onChange: (event, value) => props.onChange(value), children: props.items.map((item) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(UIFormControlLabel_1.UIFormControlLabel, { value: item.value, control: (0, jsx_runtime_1.jsx)(UIRadioButton_1.UIRadioButton, {}), label: item.label || item.value, "data-testid": `radio-group-${item.value}` }), item.renderUI && (0, jsx_runtime_1.jsx)(core_1.Collapse, { in: item.value === props.value, children: item.renderUI() })] }, item.value))) }));
};
exports.default = UIRadioGroup;
//# sourceMappingURL=UIRadioGroup.js.map