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