"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TransactionToast = exports.TransactionFailed = void 0;
var _react = _interopRequireWildcard(require("react"));
var TransactionId = _interopRequireWildcard(require("@vvv-interactive/nftanvil-tools/cjs/transactionid.js"));
var _index = require("../index.js");
var _Code = require("./Code");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const TransactionToast = props => {
  const dispatch = (0, _index.useAnvilDispatch)();
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, props.title), props.tokenId ? /*#__PURE__*/_react.default.createElement("div", {
    style: {
      fontSize: "10px"
    }
  }, /*#__PURE__*/_react.default.createElement(_Code.NFTA, null, props.tokenId)) : null, props.transactionId ? /*#__PURE__*/_react.default.createElement("div", {
    style: {
      fontSize: "10px"
    }
  }, /*#__PURE__*/_react.default.createElement(_Code.TX, null, TransactionId.toText(props.transactionId))) : null);
};
exports.TransactionToast = TransactionToast;
const TransactionFailed = _ref => {
  let {
    title,
    message
  } = _ref;
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, title), /*#__PURE__*/_react.default.createElement("div", {
    style: {
      fontSize: "10px"
    }
  }, message));
};
exports.TransactionFailed = TransactionFailed;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJUcmFuc2FjdGlvblRvYXN0IiwicHJvcHMiLCJkaXNwYXRjaCIsInVzZURpc3BhdGNoIiwidGl0bGUiLCJ0b2tlbklkIiwiZm9udFNpemUiLCJ0cmFuc2FjdGlvbklkIiwiVHJhbnNhY3Rpb25JZCIsInRvVGV4dCIsIlRyYW5zYWN0aW9uRmFpbGVkIiwibWVzc2FnZSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL1RyYW5zYWN0aW9uVG9hc3QuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tIFwicmVhY3RcIjtcblxuaW1wb3J0ICogYXMgVHJhbnNhY3Rpb25JZCBmcm9tIFwiQHZ2di1pbnRlcmFjdGl2ZS9uZnRhbnZpbC10b29scy9janMvdHJhbnNhY3Rpb25pZC5qc1wiO1xuaW1wb3J0IHtcbiAgdXNlQW52aWxTZWxlY3RvciBhcyB1c2VTZWxlY3RvcixcbiAgdXNlQW52aWxEaXNwYXRjaCBhcyB1c2VEaXNwYXRjaCxcbn0gZnJvbSBcIi4uL2luZGV4LmpzXCI7XG5pbXBvcnQgeyBUWCwgQUNDLCBORlRBLCBIQVNIIH0gZnJvbSBcIi4vQ29kZVwiO1xuXG5leHBvcnQgY29uc3QgVHJhbnNhY3Rpb25Ub2FzdCA9IChwcm9wcykgPT4ge1xuICBjb25zdCBkaXNwYXRjaCA9IHVzZURpc3BhdGNoKCk7XG5cbiAgcmV0dXJuIChcbiAgICA8ZGl2PlxuICAgICAgPGRpdj57cHJvcHMudGl0bGV9PC9kaXY+XG4gICAgICB7cHJvcHMudG9rZW5J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