import { AppShell } from '@/components/app/app-shell'
import { requireRoleRoute } from '@/lib/role-route'
import { PrivateTripForm } from './private-trip-form'

/** Pilot Dispatch · New Trip — `/pd-new-trip` (private trip, Phase 1 replica). */
export default async function PilotDispatchNewTripPage() {
  const { profile } = await requireRoleRoute('pilot-company')
  return (
    <AppShell profile={profile}>
      <main className="mx-auto max-w-2xl px-4 py-8">
        <h1 className="text-2xl font-bold tracking-tight">Create a private trip</h1>
        <p className="mt-1 text-sm text-neutral-600">
          Your own workspace for a job — store the permit copies, ask the agent, order routes and
          keep the history. Nobody is invited until you share it.
        </p>
        <PrivateTripForm />
      </main>
    </AppShell>
  )
}
