import React, { useRef } from 'react';
import { ChevronLeft, ChevronRight } from 'lucide-react';
import MovieCard from './MovieCard';
const MovieCarousel = ({ genre, movies, isDark = false }) => {
const scrollContainerRef = useRef(null);
const scroll = (direction) => {
if (scrollContainerRef.current) {
const scrollAmount = 400;
if (direction === 'left') {
scrollContainerRef.current.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
} else {
scrollContainerRef.current.scrollBy({ left: scrollAmount, behavior: 'smooth' });
}
}
};
return (
{/* Genre Header */}
{genre}
{movies.length} movies
{/* Carousel Container */}
{/* Left Arrow */}
{/* Scrollable Container */}
{movies.map((movie) => (
))}
{/* Right Arrow */}
{/* Custom Scrollbar Hide */}
);
};
export default MovieCarousel;