import { PropsWithChildren } from 'react' import { Swiper, SwiperProps } from 'swiper/react' import dynamic from 'next/dynamic' import { SwiperStoryblok } from '../../typings/generated/components-schema' const EffectCoverflow = dynamic(() => import('./SwiperEffectCoverflow')) const EffectCube = dynamic(() => import('./SwiperEffectCube')) const EffectFade = dynamic(() => import('./SwiperEffectFade')) const EffectFlip = dynamic(() => import('./SwiperEffectFlip')) const EffectCards = dynamic(() => import('./SwiperEffectCards')) const EffectCreative = dynamic(() => import('./SwiperEffectCreative')) export default function LmSwiperContainer({ children, swiperProps, effect }: PropsWithChildren<{ swiperProps: SwiperProps effect: SwiperStoryblok['effect'] }>) { if (effect === 'coverflow') { return ( {children} ) } else if (effect === 'cube') { return {children} } else if (effect === 'fade') { return {children} } else if (effect === 'flip') { return {children} } else if (effect === 'cards') { return {children} } else if (effect === 'creative') { return {children} } return {children} }