"use client"; import React, { useState } from 'react'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; interface DonationPanelProps { id: string; } const DonationPanel: React.FC = ({ id }) => { const [amount, setAmount] = useState(25); const [donated, setDonated] = useState(false); const [donationInProgress, setDonationInProgress] = useState(false); const handleAmountChange = (e: React.ChangeEvent) => { const value = parseInt(e.target.value); if (!isNaN(value)) { setAmount(value); } else { setAmount(0); } }; const handleDonate = () => { if (amount > 0) { setDonationInProgress(true); // Simulate API call setTimeout(() => { setDonated(true); setDonationInProgress(false); }, 1500); } }; const predefinedAmounts = [10, 25, 50, 100]; return ( Support Wildlife Help protect the wildlife featured in Livestream {id} {!donated ? (

Your donation helps protect and preserve the habitats of these amazing creatures.

{predefinedAmounts.map((presetAmount) => ( ))}
$

100% of donations go directly to CCFW conservation efforts

) : (

Thank You!

Your donation of ${amount} will help protect Florida wildlife.

Cape Coral Friends of Wildlife is a 501(c)(3) non-profit organization. All donations are tax-deductible.
)}
); }; export default DonationPanel;