import React from 'react';
import { Radio } from 'antd';
import { validate as isUuid } from 'uuid';

const RadioButtonsList2 = ({
  options,
  value,
  onChange
}) => {
  return /*#__PURE__*/React.createElement(Radio.Group, {
    value: isUuid(value) ? value.assetId : value,
    buttonStyle: "solid",
    onChange: e => onChange(e.target.value)
  }, options.map(({
    label,
    value: val
  }, i) => /*#__PURE__*/React.createElement(Radio.Button, {
    key: i,
    value: val
  }, label)));
};

export default RadioButtonsList2;