import Link from 'next/link'
import type { ReactNode } from 'react'
import type { BlogPost, BlogPagination } from '@startsimpli/api/blog'
import { ArticleCard } from './ArticleCard'
import { cn } from '../../utils/cn'
export interface BlogIndexProps {
posts: BlogPost[]
pagination: BlogPagination
/** Current page (1-based). */
page: number
/** Route the index lives at, e.g. `/blog`. Used for card links + pagination. */
basePath?: string
/** Resolve a post's image URL (pass the client's `getImageUrl`). */
getImageUrl?: (url?: string | null) => string
/** Byline shown on each card (typically the site name). */
byline?: string
/** Hero copy. */
eyebrow?: string
title: string
subtitle?: string
/** Rendered in place of the grid when there are no posts. */
emptyState?: ReactNode
className?: string
}
/**
* Full blog index composer: hero + responsive card grid + windowed pagination.
* Apps supply data + copy; everything is themed with shared tokens. Per-app
* code reduces to fetching posts and rendering `
{subtitle}
}