import { createElement } from 'react'; import type { RouteObject } from 'react-router-dom'; import OilBarrelIcon from '@mui/icons-material/OilBarrel'; import type { MenuItem } from '@/shell/types'; import { TripPage, TripsPage } from './pages'; import strings from './strings'; /** Refinery trips (legacy REFINERYTRIPGRID / REFINERYTRIP). Buttons inside the pages are gated by the action permission keys. */ export const routes: RouteObject[] = [ { path: '/refinery/trips', element: createElement(TripsPage) }, { path: '/refinery/trips/:id', element: createElement(TripPage), handle: { crumb: strings['trips.crumb'] } }, ]; /** Leaf entry only: the lead composes the refinery group. Key = screen key RefineryTrips. */ export const menuItems: MenuItem[] = [ { key: 'refinery.trips', title: strings['trips.menu'], icon: OilBarrelIcon, path: '/refinery/trips' }, ];