import { type ElementType, type ReactElement } from "react"; import type { PostMeta } from "../../blog/types.js"; /** * Props for {@link BlogOverviewGrid}. */ export interface BlogOverviewGridProps { /** The posts to display (already newest-first), each carrying `readingTime`/`categories`. */ posts: PostMeta[]; /** The distinct categories across `posts`; filter buttons render only when there are 2+. */ categories: string[]; /** Route the blog is mounted at; used to build each card's link. */ basePath: string; /** The blog's default locale code, so each card links to `localePath` (default vs prefixed). */ defaultLocale: string; /** Whether the default locale is URL-prefixed too; forwarded to `localePath`. */ prefixDefaultLocale: boolean; /** * Whether the site serves one domain per locale (no locale is URL-prefixed); forwarded to * `localePath`. Defaults to `false`. */ domainPerLocale?: boolean | undefined; /** When `false`, built hrefs omit the trailing slash. Defaults to `true`. */ trailingSlash?: boolean | undefined; /** BCP 47 locale used to format each card's date. */ locale: string; /** The render language, used to localize the built-in labels and the per-card reading time. */ lang?: string; /** How many cards to reveal per page / per infinite-scroll batch. */ pageSize: number; /** Element used for card images (e.g. `next/image`). */ imgComponent: ElementType; /** Element used for card links (e.g. `next/link`). */ linkComponent: ElementType; /** Message shown when no post matches the current search/filter. Defaults to the `lang` translation. */ emptyLabel?: string; /** Call-to-action label at the bottom of each card. Defaults to the `lang` translation. */ readMoreLabel?: string; /** Placeholder for the search box. Defaults to the `lang` translation. */ searchPlaceholder?: string; /** Label for the "load more" button. Defaults to the `lang` translation. */ loadMoreLabel?: string; /** Label for the filter button that clears the category filter. Defaults to the `lang` translation. */ allCategoriesLabel?: string; } /** * The interactive body of {@link import("./BlogOverview.js").BlogOverview}: a fuzzy search box, * optional category filter buttons, and a card grid that reveals posts in `pageSize` batches - * auto-loading the next batch when the reader scrolls to the bottom, with a "load more" button * as an explicit fallback. * * A client component (search, filtering, and infinite scroll need browser state/APIs). It * receives a serialisable `PostMeta[]` from the server `BlogOverview`, which keeps the `Blog` * instance and SEO JSON-LD on the server. * * @param props - see {@link BlogOverviewGridProps}. * @returns the interactive overview grid. */ export declare function BlogOverviewGrid({ posts, categories, basePath, defaultLocale, prefixDefaultLocale, domainPerLocale, trailingSlash, locale, lang, pageSize, imgComponent: Img, linkComponent: Link, emptyLabel, readMoreLabel, searchPlaceholder, loadMoreLabel, allCategoriesLabel, }: BlogOverviewGridProps): ReactElement;