import React from 'react';
import { Image } from '../Image';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
export var List = function List(_ref) {
  var items = _ref.items,
      onRemove = _ref.onRemove;
  return React.createElement("table", {
    className: "table table-borderless"
  }, items.map(function (item, i) {
    return React.createElement("tr", {
      key: i
    }, React.createElement("td", {
      className: "align-middle"
    }, React.createElement(Image, {
      src: item.image,
      alt: item.description
    })), React.createElement("td", {
      className: "align-middle"
    }, item.description), React.createElement("td", {
      className: "align-middle"
    }, item.price), React.createElement("td", {
      className: "align-middle"
    }, React.createElement("button", {
      className: "btn btn-link",
      onClick: onRemove
    }, React.createElement(FontAwesomeIcon, {
      icon: faTimes,
      size: "2x"
    }))));
  }));
};