import { api } from '../api.js'; /** * Netflix 2025 "New & Hot" Feed Component * Optimized for mobile vertical scrolling */ export function createNewAndHotItem(video) { const item = document.createElement('div'); item.className = 'new-hot-item'; // Random date for demo const months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']; const month = months[Math.floor(Math.random() * 12)]; const day = Math.floor(Math.random() * 28) + 1; // Use image proxy for performance (width 400 for better quality on larger cards) const imgUrl = api.getProxyUrl(video.backdrop || video.thumbnail, 400); item.innerHTML = `
${month} ${day}
${video.title}

${video.title}

${video.description || 'Watch now on Netflix.'}

${(video.genres || ['Exciting', 'Action', 'Netflix Original']).map(t => `${t}`).join('')}
`; return item; } export function renderNewAndHotView(container, videos) { container.innerHTML = `
`; const feed = container.querySelector('.new-hot-feed'); videos.forEach(video => { feed.appendChild(createNewAndHotItem(video)); }); }