import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import cx from 'classnames';
export var RadioStack = function RadioStack(_ref) {
  var radios = _ref.radios,
      id = _ref.id,
      active = _ref.active,
      handleChange = _ref.onChange;
  return React.createElement("div", {
    className: "btn-group w-100",
    "data-toggle": "buttons"
  }, radios.map(function (radio) {
    return React.createElement("label", {
      className: cx('btn', 'btn-primary', {
        active: active === radio.id
      }),
      key: radio.id
    }, React.createElement(FontAwesomeIcon, {
      icon: radio.icon,
      size: "1x",
      className: "mr-3"
    }), React.createElement("input", {
      type: "radio",
      name: id,
      id: radio.id,
      className: "sr-only",
      value: radio.id,
      checked: active === radio.id,
      onChange: handleChange
    }), radio.title);
  }));
};