import { createSignal, For, Show } from 'solid-js' import { Icon } from '../Icon' import { register } from 'swiper/element/bundle' import SwiperCore, { Manipulation, Navigation, Pagination } from 'swiper' import { SwiperRef } from './swiper' import { clsx } from 'clsx' import styles from './Swiper.module.scss' import { Shout } from '../../../graphql/types.gen' import { ArticleCard } from '../../Feed/ArticleCard' type Props = { slides: Shout[] title?: string } register() SwiperCore.use([Pagination, Navigation, Manipulation]) export const ArticleCardSwiper = (props: Props) => { const [slideIndex, setSlideIndex] = createSignal(0) const mainSwipeRef: { current: SwiperRef } = { current: null } const handleSlideChange = () => { setSlideIndex(mainSwipeRef.current.swiper.activeIndex) } return (