import { AccountCard } from '@/components/AccountCard' import type { EngagementAccount } from '@/types' interface AccountListProps { accounts: EngagementAccount[] selectedDids: Set onToggle: (did: string) => void onSelectAll: () => void onDeselectAll: () => void } const RELATIONSHIP_ORDER = { mutual: 0, following: 1, follower: 2, none: 3 } as const export function AccountList({ accounts, selectedDids, onToggle, onSelectAll, onDeselectAll, }: AccountListProps) { const sorted = [...accounts].sort((a, b) => { const ra = RELATIONSHIP_ORDER[a.relationship] const rb = RELATIONSHIP_ORDER[b.relationship] if (ra !== rb) return ra - rb return a.profile.handle.localeCompare(b.profile.handle) }) const selectedCount = accounts.filter((a) => selectedDids.has(a.profile.did)).length return (
{/* Header */}
Who to block {selectedCount.toLocaleString()} / {accounts.length.toLocaleString()}
·
{/* Account list — scrollable */}
{sorted.length === 0 ? (

No engagers found for the selected criteria.

) : ( sorted.map((account) => ( onToggle(account.profile.did)} /> )) )}
) }