"use client"
import React, { useState } from 'react'
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import Slider from "react-slick";
import './slick.css'
import { CoursesProps, CoursesArrayProps } from "@/types";
import { IoIosArrowForward, IoIosArrowBack } from "react-icons/io";
const SamplePrevArrow = (props: any) => {
const { className, style, onClick } = props;
return (
);
}
function SampleNextArrow(props: any) {
const { className, style, onClick } = props;
return (
);
}
const CourseImagesSilder = ({ courseData }: { courseData: CoursesProps }) => {
const [currentSlide, setCurrentSlide] = useState(0);
var settings = {
arrows: false,
className: "center",
centerMode: true,
infinite: true,
centerPadding: "30px",
dots: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
beforeChange: (current: number, next: number) => setCurrentSlide(next),
appendDots: (dots: any) => (
),
dotsClass: 'dots_custom'
};
var settings2 = {
fade: true,
centerMode: true,
infinite: true,
dots: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
nextArrow: ,
prevArrow: ,
beforeChange: (current: number, next: number) => setCurrentSlide(next),
appendDots: (dots: any) => (
),
dotsClass: 'dots_custom'
};
return (
{courseData.images.length > 0 && (
{courseData.images.map((image, index) => (
))}
)}
{courseData.images.length > 0 && (
{courseData.images.map((image, index) => {
return (
{index !== currentSlide && (
)}
)
})}
)}
)
}
export default CourseImagesSilder