'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'
import { HomeButton } from '@/app/components/HomeButton'
import { DiscordButton } from '@/app/components/DiscordButton'

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

  return (
    <div className='box text-center'>
      <HomeButton />
      <DiscordButton />
      <p className='text-4xl'>Berry Dash</p>
      <p>
        Berry Dash is the first game Lncvrt ever made in Unity. The game is a
        simple but also complex game at the same time.
      </p>
      <p>
        Berry Dash has a Leaderboard System, Account System, Profiles, Icon
        marketplace, chatroom, custom mode, and more.
      </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-240 w-[calc(100vw-64px)]'
      >
        <SwiperSlide>
          <Image
            src={'https://games-r2.lncvrt.xyz/screenshots/berry-dash/home.png'}
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://games-r2.lncvrt.xyz/screenshots/berry-dash/mode-select.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://games-r2.lncvrt.xyz/screenshots/berry-dash/playing.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://games-r2.lncvrt.xyz/screenshots/berry-dash/custom.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={'https://games-r2.lncvrt.xyz/screenshots/berry-dash/stats.png'}
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://games-r2.lncvrt.xyz/screenshots/berry-dash/leaderboards.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
        <SwiperSlide>
          <Image
            src={
              'https://games-r2.lncvrt.xyz/screenshots/berry-dash/chatroom.png'
            }
            width={960}
            height={540}
            alt=''
          />
        </SwiperSlide>
      </Swiper>
      <p className='text-2xl mt-4 mb-1'>Stuff you can do in the browser</p>
      <div className='downloads'>
        <Link href='/game/berry-dash/icon-marketplace' draggable={false}>
          View the Icon Marketplace! (can upload too)
        </Link>
        <Link href='/game/berry-dash/splash' draggable={false}>
          View the Splash Texts! (can submit too)
        </Link>
        <Link href='/game/berry-dash/chatroom' draggable={false}>
          View & interact with the Chatroom!
        </Link>
      </div>
      <p className='text-2xl my-1'>Downloads</p>
      <div className='downloads'>
        <Link
          href='https://games-r2.lncvrt.xyz/berry-dash/Berry-Dash-1.8.2-android.apk'
          draggable={false}
        >
          Android
        </Link>
        <Link
          href='https://games-r2.lncvrt.xyz/berry-dash/Berry-Dash-1.8.2-ios.ipa'
          draggable={false}
        >
          iOS
        </Link>
        <Link href='/download' draggable={false}>
          Windows, macOS, or Linux
        </Link>
      </div>
    </div>
  )
}
