'use client'

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

/**
 * Freight Broker Trip View (FB). Own page, own route, own data loader; the layout
 * comes from the shared trip-workspace shell (article §7 allows reused
 * components). A change asked for the Broker Trip View is made HERE or by
 * passing a broker-specific option — never inside the carrier page.
 */
export function BrokerTripView(props: Omit<TripWorkspaceProps, 'pageContext' | 'tripHref'>) {
  // Nash, 2026-09-13: on a phone the freight broker lands on Trip Info; a
  // floating microphone opens the chat. Freight broker page only.
  return <TripWorkspace {...props} pageContext="broker" tripHref={(t) => tripPath('broker', t.ref_code)} mobileLanding="info" />
}
