import QRCode from 'qrcode.react'
import { CopyInput, InputSkeleton } from './form'
import InvoiceStatus from './invoice-status'
import { useEffect } from 'react'
import { useWallet } from 'wallets'
import Bolt11Info from './bolt11-info'
export default function Qr ({ asIs, value, useWallet: automated, statusVariant, description, status }) {
const qrValue = asIs ? value : 'lightning:' + value.toUpperCase()
const wallet = useWallet()
useEffect(() => {
async function effect () {
if (automated && wallet) {
try {
await wallet.sendPayment(value)
} catch (e) {
console.log(e?.message)
}
}
}
effect()
}, [wallet])
return (
<>