<!-- source-hash: 4cdb3166112b0dff8dcc314964dcbba3 -->
Utility functions for processing and handling media items in carousel components, providing standardized interfaces for images, videos, and embedded content.

## Key Components

- **`MediaItem`** - Interface defining the structure for carousel media items with id, type, URL, and optional metadata
- **`processMediaItems()`** - Transforms raw media data arrays into standardized MediaItem objects with fallback values
- **`getMediaThumbnail()`** - Retrieves thumbnail URL for media items (currently returns the main URL)

## Usage Example

```typescript
import { MediaItem, processMediaItems, getMediaThumbnail } from './media-carousel-utils';

// Process raw media data
const rawItems = [
  { id: '1', type: 'image', url: '/photo1.jpg', alt: 'Photo 1' },
  { url: '/video1.mp4', type: 'video', caption: 'Demo video' },
  { url: '/embed-content' } // Missing fields will use defaults
];

const mediaItems: MediaItem[] = processMediaItems(rawItems);

// Get thumbnail for display
mediaItems.forEach(item => {
  const thumbnail = getMediaThumbnail(item);
  console.log(`${item.type}: ${thumbnail}`);
});
```

The utility handles missing properties gracefully, using index-based IDs and 'image' as the default type when not specified.