import React from 'react';
import { locales } from '@pisell/utils';
import { Button, Iconfont } from '@pisell/materials';
import "./index.less";
var ToBPayCard = function ToBPayCard(_ref) {
  var data = _ref.data,
    onChange = _ref.onChange;
  var name = data.name,
    type = data.type;
  return /*#__PURE__*/React.createElement("div", {
    className: "tob-pay-card",
    onClick: function onClick() {
      return onChange(data, 'pay');
    }
  }, /*#__PURE__*/React.createElement(Iconfont, {
    type: "icona-zu6491",
    style: {
      color: 'var(--theme-color)',
      fontSize: '30px',
      marginBottom: '10px'
    }
  }), /*#__PURE__*/React.createElement("div", {
    className: "tob-pay-card-name"
  }, name || ''), type === 'eftpos' ? /*#__PURE__*/React.createElement(Button, {
    type: "link",
    onClick: function onClick(e) {
      e.stopPropagation();
      onChange(data, 'fullPay');
    }
  }, locales.getText('tobPay.text.card.edit.amount')) : null);
};
export default ToBPayCard;