import type { Exercise, ExerciseConfig } from '@inject/graphql/fragment-types'
import { createContext } from 'react'
import { DUMMY_EXERCISE, DUMMY_EXERCISE_CONFIG } from './utilities'

interface ExerciseContextProps {
  exercise: Exercise
  exerciseConfig: ExerciseConfig
}

// TODO: why the context when we have the data anyway???
const ExerciseContext = createContext<ExerciseContextProps>({
  exercise: DUMMY_EXERCISE,
  exerciseConfig: DUMMY_EXERCISE_CONFIG,
})

export default ExerciseContext
