---
/**
* Carousel — a titled, sideways row of cards with previous and next buttons.
* title: the label above the row; it names the region.
* items: Card props, one card each. Or leave items out and fill the default
* slot with
elements, each holding a card.
* prevLabel, nextLabel: the buttons' accessible names.
* titleId: the title's id, unique on the page.
* Behaviour (the script below): the buttons move the row one card; at
* either end the button is disabled, and both hide when every card fits.
*/
import Card from './Card.astro';
interface Props {
title: string; items?: Record[];
prevLabel?: string; nextLabel?: string; titleId?: string;
}
const { title, items, prevLabel = 'Previous', nextLabel = 'Next', titleId = 'carousel-title' } = Astro.props;
---
{items ? items.map((c) => ) : }