import { AppShell } from "@/components/app-shell"
import { SiteHeader, SiteHeaderPrimaryButton } from "@/components/site-header"
import { PlayNextTicketCard } from "@/components/tickets/play-next-ticket-card"
import { TicketQueueSummaryCards } from "@/components/tickets/ticket-queue-summary"
import { requireAuthenticatedSession } from "@/lib/auth-server"

export default async function PlayPage() {
  await requireAuthenticatedSession()
  return (
    <AppShell
      header={
        <SiteHeader
          title="Modo play"
          lead="Distribua tickets automaticamente conforme prioridade"
          primaryAction={<SiteHeaderPrimaryButton>Iniciar sessão</SiteHeaderPrimaryButton>}
        />
      }
    >
      <div className="flex flex-col gap-6 px-4 lg:px-6">
        <PlayNextTicketCard />
        <TicketQueueSummaryCards />
      </div>
    </AppShell>
  )
}
