import React from "react";
import { Radio } from "./Radio";
const get = (obj, property) => (typeof obj === "object" ? obj[property] : obj);
export const RadioGroup = ({ radioArr, layout, name, selected, setSelected, }) => {
    return (React.createElement("div", { className: "on-radio-wrapper" + " " + layout }, radioArr.map((item, index) => (React.createElement(Radio, { key: index, name: name, value: get(item, "value"), label: get(item, "label"), checked: selected === get(item, "value"), onChange: (e) => setSelected(e.target.value) })))));
};
