import { getArenas } from '@/actions/arena'
import { MatchScheduler } from '@/components/MatchScheduler'
import Link from 'next/link'
import { ChevronLeft } from 'lucide-react'

export default async function SchedulePage() {
    const arenas = await getArenas()

    return (
        <div className="max-w-5xl mx-auto space-y-8">
            <header className="flex items-center gap-4">
                <Link
                    href="/dashboard/matches"
                    className="p-2 hover:bg-surface-raised rounded-lg transition-all border border-border text-muted hover:text-foreground"
                >
                    <ChevronLeft className="w-5 h-5" />
                </Link>
                <span className="text-xs font-bold uppercase tracking-widest text-muted">Voltar para Partidas</span>
            </header>

            <MatchScheduler arenas={arenas} />
        </div>
    )
}
