'use client'; import { DateFormatter } from '@/lib/formatters/DateFormatter'; import { Button } from '@/ui/Button'; import { Card, Card as Surface } from '@/ui/Card'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { ProfileSection } from './ProfileSection'; interface Request { id: string; sponsorName: string; message?: string | null; createdAtIso: string; } interface Section { entityId: string; entityName: string; entityType: string; requests: Request[]; } interface SponsorshipRequestsPanelProps { sections: Section[]; onAccept: (requestId: string) => Promise; onReject: (requestId: string, reason?: string) => Promise; processingId?: string | null; } export function SponsorshipRequestsPanel({ sections, onAccept, onReject, processingId, }: SponsorshipRequestsPanelProps) { return ( {sections.map((section) => ( {section.requests.length === 0 ? ( No pending requests. ) : ( {section.requests.map((request) => ( {request.sponsorName} {request.message && ( {request.message} )} {DateFormatter.formatShort(request.createdAtIso)} ))} )} ))} ); }