import render from './../../utils/render.sjs';

function getCardIcon(extInfo, imgSrcPrefix) {
  const { imgUrl = '' } = extInfo || {};
  return render.getImageUrl(imgUrl, imgSrcPrefix);
}

function getTip(extInfo) {
  const { certCodeTips } = extInfo || {};
  return certCodeTips;
}

function getQrcode(info) {
  const { qrCodeUrl, qrCodeImgBase64 } = info || {};
  return qrCodeUrl || qrCodeImgBase64;
}

export default {
  getTip,
  getQrcode,
  getCardIcon,
};
