import { FeedItemCard } from '@/components/feed/FeedItemCard';
import { FeedEmptyState } from '@/ui/FeedEmptyState';
import { Stack } from '@/ui/Stack';
import React from 'react';

interface FeedItemData {
  id: string;
  type: string;
  headline: string;
  body?: string;
  timestamp: string;
  formattedTime: string;
  ctaHref?: string;
  ctaLabel?: string;
}

interface FeedListProps {
  items: FeedItemData[];
}

export function FeedList({ items }: FeedListProps) {
  if (!items.length) {
    return <FeedEmptyState />;
  }

  return (
    <Stack gap={4}>
      {items.map(item => (
        <FeedItemCard key={item.id} item={item} />
      ))}
    </Stack>
  );
}
