import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Download, Zap } from 'lucide-react'; interface ReceiveCardProps { mode: 'tokens' | 'lightning'; tokenInput: string; setTokenInput: (value: string) => void; quoteAmount: string; setQuoteAmount: (value: string) => void; activeMintUrl: string | null; onReceive: () => void; isLoading: boolean; } export function ReceiveCard({ mode, tokenInput, setTokenInput, quoteAmount, setQuoteAmount, activeMintUrl, onReceive, isLoading, }: ReceiveCardProps) { return (
{/* Title */}

{mode === 'tokens' ? 'Enter Cashu token to redeem' : 'Deposit funds with Lightning' }

{/* Content */}
{mode === 'tokens' ? ( <> {!activeMintUrl && (
Select a mint to receive tokens
)}
setTokenInput(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter' && tokenInput.trim() && activeMintUrl && !isLoading) { onReceive(); } }} disabled={!activeMintUrl} className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2" />
) : ( <> {!activeMintUrl && (
Select a mint to create Lightning invoice
)}
setQuoteAmount(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter' && quoteAmount && activeMintUrl && !isLoading) { onReceive(); } }} disabled={!activeMintUrl} className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]" />
)}
); }