import React from 'react';
import { PisellModal, PisellCardList, PisellEmpty } from '@pisell/materials';
import { locales } from '@pisell/utils';
import "./index.less";
var WalletModal = function WalletModal(_ref) {
  var visible = _ref.visible,
    walletData = _ref.walletData,
    onClose = _ref.onClose,
    title = _ref.title,
    emptyText = _ref.emptyText;
  return /*#__PURE__*/React.createElement(PisellModal, {
    title: /*#__PURE__*/React.createElement("div", {
      className: "wallet-modal-title"
    }, title),
    open: visible,
    onCancel: onClose,
    width: 680,
    footerDivider: false,
    headerDivider: false,
    cancelVisible: false,
    onOk: onClose,
    okText: locales.getText('wallet-pass-module-expired-modal-close')
  }, /*#__PURE__*/React.createElement("div", {
    className: "wallet-modal-content"
  }, walletData && walletData.length > 0 ? /*#__PURE__*/React.createElement(PisellCardList, {
    showActiveBackground: true,
    showName: true,
    showStoreName: false,
    showRedeem: true,
    showBalance: true,
    showCode: true,
    showValidDate: true,
    showDetail: true,
    showQrCode: true,
    showCover: true,
    platform: "pc",
    mode: "single",
    direction: "horizontal",
    type: "mini",
    data: walletData,
    hasMore: false,
    showEmpty: false,
    fullWidth: false,
    showStatus: false,
    nameTitleStyle: {
      fontSize: 20,
      fontWeight: 600,
      color: '#f5a623'
    },
    actions: {
      layout: 'expanded',
      detail: {
        visible: false,
        iconColor: '#1570EF'
      },
      edit: {
        visible: false,
        iconColor: '#1570EF'
      }
    }
  }) : /*#__PURE__*/React.createElement(PisellEmpty, {
    title: emptyText || locales.getText('wallet-pass-module-expired-modal-empty')
  })));
};
export default WalletModal;