import { MediaSlide } from './components/MediaSlide';
import { MediaTrack } from './components/MediaTrack';
import { MAX_MEDIA } from './constants';
import type { MediaCarouselProps } from './types';
/**
* A post's images. One shows full width at its own ratio, letterboxed at 400px on
* `surface-sunken`; 2–4 swipe in 280px slides with dots and a «۱ / ۳» count. Server-renderable:
* a single image ships no JavaScript, and only the swipe track is a client component, so every
* prop it takes is serializable except `onOpen`, which only a client caller can pass.
*/
export function MediaCarousel({
items,
slideLabels,
href,
onOpen,
label,
className,
}: MediaCarouselProps) {
const shown = items.slice(0, MAX_MEDIA);
if (shown.length === 0) return null;
if (shown.length === 1) {
return (
);
}
return (
);
}