import { nextTime } from './utils'
import { SubBlockFragment, TrainingQuery, BlockContentFragment } from '../gql'

export const emptyBlock: BlockContentFragment = {
  id: '',
  title: '',
  format: { id: '', name: '', description: '' },
  videos: [],
  pictures: [],
  blocks: [],
  exercises: []
}

export const emptyBlockInstance: SubBlockFragment = {
  id: '',
  order: 0,
  block: emptyBlock
}

export const emptyTraining: NonNullable<TrainingQuery['training']> = {
  id: '',
  createdAt: '',
  title: '',
  location: '',
  attendance: 0,
  trainingDate: nextTime('Tuesday', '11:45'),
  type: { id: '', name: '', description: '' },
  blocks: [] as SubBlockFragment[],
  published: false
}
