import { LmSwiperItemProps } from './sliderTypes'
import { LmComponentRender } from '@LmComponentRender'
import NextImage, { ImageProps } from 'next/image'
import { getOriginalImageDimensions } from '../../utils/imageServices'
function SwiperImage({ content, options }: LmSwiperItemProps) {
if (content.image?.filename) {
const imgProps: ImageProps = {
alt: content.image.alt || 'swiper',
src: content.image.filename,
fill: true
}
if (
['cube', 'cards', 'coverflow', 'creative'].includes(options?.effect || '')
) {
//
} else {
const { width, height } = getOriginalImageDimensions(
content.image.filename
)
imgProps.width = width
imgProps.height = height
}
return (
)
}
return null
}
export default function LmSwiperSlide({ content, options }: LmSwiperItemProps) {
return (
<>
{content.body?.map((blok) => (
))}
>
)
}