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

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

  return (
    <Container makeFullHeight>
      <ActionLog
        exerciseId={exerciseId}
        teamId={teamId}
        channelId={channelId}
        getOnInspect={actionLogId => () =>
          nav('/instructor/:exerciseId/:teamId/:channelId/tool/:actionLogId', {
            params: { exerciseId, teamId, channelId, actionLogId },
          })
        }
        noDataProps={{
          title: "The selected team hasn't used any tools yet",
          description:
            'Responses from tools will appear here. You can see the \
              available tools in the right sidebar',
        }}
      />
    </Container>
  )
}

export default Page
