<script>
// usually this import strategy should work:
//import {Motion, AnimatePresence} from "svelte-motion";
import Motion from 'svelte-motion/src/motion/MotionSSR.svelte';
import AnimatePresence from 'svelte-motion/src/components/AnimatePresence/AnimatePresence.svelte';
let isOn = 0;
const images = [
"https://www.blendernation.com/wp-content/uploads/2020/01/night-van.jpg",
"https://www.blendernation.com/wp-content/uploads/2020/01/felipe-oliveira-gall-render-01-scaled.jpg",
"https://www.blendernation.com/wp-content/uploads/2020/01/11-1.jpg",
"https://www.blendernation.com/wp-content/uploads/2020/01/concept_001_post-scaled.jpg"
];
const direction =1;
const variants = {
enter: (direction) => {
return {
x: direction > 0 ? 1000 : -1000,
opacity: 0,
};
},
center: {
zIndex: 1,
x: 0,
opacity: 1,
},
exit: (direction) => {
return {
zIndex: 0,
x: direction < 0 ? 1000 : -1000,
opacity: 0,
};
},
};
const wrap = (a,l)=>{