import Link from 'next/link'; import { ArrowRight, FileText } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from '@/components/ui/carousel'; export type PostsCarouselProps = { heading?: string; description?: string; posts?: Array<{ title: string; category?: string; date?: string; imageUrl?: string; imageAlt?: string; url: string; typeLabel?: string }>; viewAllLabel?: string; viewAllUrl?: string; }; export default function PostsCarousel({ heading = '', description = '', posts = [], viewAllLabel = '', viewAllUrl = '#' }: PostsCarouselProps) { return (

{heading}

{description &&

{description}

}
{posts.map((post, index) => (
{post.imageUrl ? {post.imageAlt :
Add an image
} {post.typeLabel && }
{post.category && {post.category}}{post.date && {post.date}}

{post.title}

))}
{viewAllLabel && }
); }