import React from 'react';
import { Wrapper, ButtonWrapper } from './radioButtonsList1.styles';
import { validate as isUuid } from 'uuid';

const RadioButtonsList = ({
  options,
  value,
  onChange
}) => {
  if (!options || options.length === 0) return null;
  return /*#__PURE__*/React.createElement(Wrapper, null, options.map(({
    label,
    value: val
  }, i) => /*#__PURE__*/React.createElement(ButtonWrapper, {
    key: i,
    selected: isUuid(val) ? val === value && value.assetId : val === value,
    onClick: () => onChange(val)
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null))), /*#__PURE__*/React.createElement("div", null, label))));
};

export default RadioButtonsList;