import { ref, watchEffect } from "vue";
import { useDragAndDrop } from "fluid-dnd/vue";
import type { Pokemon } from "../Pokemon";
import PokemonComponent from "./PokemonComponent.vue";
import { fetchPokemons } from "@/server/pokemonServer";
import touchDelaySilder from "./touchDelaySilder.vue";
import { isMobileDevice } from "@/utils/mobile.ts";
const pokemons = ref([] as Pokemon[]);
pokemons.value = await fetchPokemons(3);
let parent = ref<HTMLElement | undefined>();
const dragAndDrop = useDragAndDrop(pokemons, {
draggingClass: "dragging-pokemon",
delayBeforeTouchMoveEvent: delay.value
<div class="flex-col gap-4">
<div class="flex max-sm:justify-center items-start">
class="bg-gray-200/60 border-solid border-black/40 rounded-2xl w-60 border-4 p-4 block"
v-for="(pokemon, index) in pokemons"
<touchDelaySilder v-if="isMobileDevice()" v-model="delay" />