'use client'

import Image from 'next/image'
import { Swiper, SwiperSlide } from 'swiper/react'
import { Navigation, Keyboard } from 'swiper/modules'
import 'swiper/css'
import 'swiper/css/navigation'
import Link from 'next/link'
import { useEffect } from 'react'

export default function BerryDashGameInfo () {
  useEffect(() => {
    document.title = 'Lncvrt Games - Berry Dash Godot Remake'
  }, [])

  return (
    <div className='box text-center'>
      <div className='relative'>
        <Link href='/' className='home-button absolute -top-4 -left-4'>
          <span className='material-symbols-outlined'>home</span>
        </Link>
      </div>
      <p className='text-4xl'>Berry Dash Godot Remake</p>
      <p>
        Berry Dash Godot Remake is a recreation of Berry Dash 1.0 in the Godot
        Game engine.
      </p>
      <p>Currently, it is a bit basic but more features will be added soon!</p>
      <p className='text-2xl mt-4 mb-1'>Screenshots</p>
      <Swiper
        modules={[Keyboard, Navigation]}
        navigation
        keyboard={{ enabled: true }}
        className='screenshots-gallery mx-auto max-w-[960px] w-[calc(100vw-64px)]'
      >
        <SwiperSlide>
          <Image
            src={
              'https://cdn-r2.lncvrt.xyz/games/screenshots/berry-dash-godot-remake/home.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://cdn-r2.lncvrt.xyz/games/screenshots/berry-dash-godot-remake/playing.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
      </Swiper>
      <p className='text-2xl mt-4 mb-1'>Downloads</p>
      <div className='downloads'>
        <Link href='/download' draggable={false}>
          Windows, macOS, or Linux
        </Link>
      </div>
    </div>
  )
}
