import { AppShell } from "@/components/app-shell"
import { SiteHeader } from "@/components/site-header"
import { DEFAULT_TENANT_ID } from "@/lib/constants"
import { AdminMachineDetailsClient } from "@/components/admin/machines/admin-machine-details.client"
import { MachineBreadcrumbs } from "@/components/admin/machines/machine-breadcrumbs.client"

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

export default function AdminMachineDetailsPage({ params }: { params: { id: string } }) {
  const { id } = params
  return (
    <AppShell header={<SiteHeader title="Detalhe da máquina" lead="Inventário e métricas da máquina selecionada." />}>
      <div className="mx-auto w-full max-w-6xl px-4 pb-12 lg:px-6">
        <MachineBreadcrumbs tenantId={DEFAULT_TENANT_ID} machineId={id} />
        <AdminMachineDetailsClient tenantId={DEFAULT_TENANT_ID} machineId={id} />
      </div>
    </AppShell>
  )
}
