import { AppShell } from "@/components/app-shell"
import { SiteHeader } from "@/components/site-header"
import { DEFAULT_TENANT_ID } from "@/lib/constants"
import { AdminDeviceDetailsClient } from "@/components/admin/devices/admin-device-details.client"
import { DeviceBreadcrumbs } from "@/components/admin/devices/device-breadcrumbs.client"

export const runtime = "nodejs"
export const dynamic = "force-dynamic"

export default async function AdminDeviceDetailsPage({ params }: { params: Promise<{ id: string }> }) {
  const { id } = await params
  return (
    <AppShell header={<SiteHeader title="Detalhe do dispositivo" lead="Inventário e métricas do dispositivo selecionado." />}>
      <div className="mx-auto w-full max-w-6xl px-4 pb-12 lg:px-6">
        <DeviceBreadcrumbs tenantId={DEFAULT_TENANT_ID} deviceId={id} />
        <AdminDeviceDetailsClient tenantId={DEFAULT_TENANT_ID} deviceId={id} />
      </div>
    </AppShell>
  )
}
