import ActionLog from '@/actionlog/ActionLog'
import { useNavigate, useParams } from '@/router'
import Container from '@inject/shared/components/Container'

const Page = () => {
  const { exerciseId, teamId, channelId } = useParams(
    '/trainee/:exerciseId/:teamId/:channelId/info'
  )
  const nav = useNavigate()

  return (
    <Container makeFullHeight>
      <ActionLog
        exerciseId={exerciseId}
        teamId={teamId}
        channelId={channelId}
        getOnInspect={actionLogId => () =>
          nav('/trainee/:exerciseId/:teamId/:channelId/info/:actionLogId', {
            params: { exerciseId, teamId, channelId, actionLogId },
          })
        }
      />
    </Container>
  )
}

export default Page
