'use client'

import { TripWorkspace, type TripWorkspaceProps } from '@/components/app/trip-workspace/trip-workspace'
import { tripPath } from '@/lib/page-context'

/**
 * Carrier Dispatch Trip View (CD). Own page, own route, own data loader; the
 * layout comes from the shared trip-workspace shell. A change asked for the
 * Carrier Dispatch Trip View is made HERE or by passing a carrier-specific
 * option — never inside the broker page.
 */
export function CarrierTripView(props: Omit<TripWorkspaceProps, 'pageContext' | 'tripHref'>) {
  // Nash, 2026-09-13: same phone logic as the freight broker trip view — land
  // on Trip Info, "Ask the Agent" / bigger "Trip Info" buttons, swipe, floating mic.
  return <TripWorkspace {...props} pageContext="carrier" tripHref={(t) => tripPath('carrier', t.ref_code)} mobileLanding="info" />
}
