import { AppStoreLink } from '@/components/AppStoreLink'
import { CircleBackground } from '@/components/CircleBackground'
import { Container } from '@/components/Container'
import Link from 'next/link'
import RecommendedInstances from '@/RECOMMENDED_INSTANCES.json'

export function CallToAction() {
  return (
    <section
      id="join"
      className="relative overflow-hidden bg-gray-900 py-20 sm:py-28"
    >
      <div className="absolute top-1/2 left-20 -translate-y-1/2 sm:left-1/2 sm:-translate-x-1/2">
        <CircleBackground color="#fff" className="animate-spin-slower" />
      </div>
      <Container className="relative">
        <div className="mx-auto max-w-md sm:text-center">
          <h2 className="text-3xl font-medium tracking-tight text-white sm:text-4xl">
            Join an Akkoma instance today!
          </h2>
          <p className="mt-4 text-lg text-gray-300">
            It&apos;s really easy to sign up and start posting!
            Try one of the following instances if you don&apos;t have one of your own.
          </p>
          <div className="mt-8 flex justify-center">
            <ul className={"text-white list-disc"}>
                {RecommendedInstances.map((instance) => (
                    <li key={instance.name}>
                        <Link href={instance.link}>
                            {instance.name}
                        </Link>
                    </li>
                ))}
            </ul>
          </div>
        </div>
      </Container>
    </section>
  )
}
