import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Collapse, RadioGroup } from "@material-ui/core";
import { StyledFormControlLabel } from "./FormControlLabel";
import { StyledRadio } from "./Radio";
const RadioGroupWithContent = (props) => {
    return (_jsx(RadioGroup, Object.assign({ value: props.value, onChange: (event, value) => props.onChange(value) }, { children: props.items.map((item) => (_jsxs("div", { children: [_jsx(StyledFormControlLabel, { value: item.value, control: _jsx(StyledRadio, {}, void 0), label: item.label || item.value, "data-testid": `radio-group-${item.value}` }, void 0),
                item.renderUI && _jsx(Collapse, Object.assign({ in: item.value === props.value }, { children: item.renderUI() }), void 0)] }, item.value))) }), void 0));
};
export default RadioGroupWithContent;
//# sourceMappingURL=RadioGroupWithContent.js.map