import { AppShell } from "@/components/app-shell"
import { SectionCards } from "@/components/section-cards"
import { SiteHeader } from "@/components/site-header"
import { RecentTicketsPanel } from "@/components/tickets/recent-tickets-panel"
import { TicketQueueSummaryCards } from "@/components/tickets/ticket-queue-summary"
import { ChartOpenedResolved } from "@/components/charts/chart-opened-resolved"
import { NewTicketDialogDeferred } from "@/components/tickets/new-ticket-dialog.client"

export default function Dashboard() {
  return (
    <AppShell
      header={
        <SiteHeader
          title="Central de operações"
          lead="Monitoramento em tempo real"
          secondaryAction={<SiteHeader.SecondaryButton>Modo play</SiteHeader.SecondaryButton>}
          primaryAction={<NewTicketDialogDeferred />}
        />
      }
    >
      <SectionCards />
      <div className="grid gap-6 px-4 lg:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)] lg:px-6 lg:[&>*]:min-w-0">
        <ChartOpenedResolved />
        <RecentTicketsPanel />
      </div>
      <div className="px-4 lg:px-6">
        <TicketQueueSummaryCards />
      </div>
    </AppShell>
  )
}

