import { CourseCategories } from '@/data/config';
import type {
  BoardItem,
  VideoBoard,
  QuizBoard,
  CourseBoard,
  ProgramBoard,
} from '@/types';

export function createEmptyBoardItem(): BoardItem {
  return {
    docId: '',
    userId: '',
    title: '',
    description: '',
    boards_number: 0,
    created: '',
    files: [],
    thumbnail: { name: '', url: '' },
    boardState: {
      state: 'pending',
      error: undefined,
    },
  };
}
export function createEmptyVideoBoard(): VideoBoard {
  return {
    ...createEmptyBoardItem(),
    video: {
      url: '',
      duration: 0,
      provider: 'unknown',
    },
  };
}
export function createEmptyQuizBoard(): QuizBoard {
  return {
    ...createEmptyBoardItem(),
    question: '',
    answers: [],
  };
}
export function createEmptyCourseBoard(): CourseBoard {
  return {
    ...createEmptyBoardItem(),
    category: CourseCategories[0],
    isStrict: false,
    courseElements: [],
    headline: '',
    video: {
      url: '',
      duration: 0,
      provider: 'unknown',
    },
    expiresWhen: '',
    keywords: [],
  };
}
// export function createEmptyProgramBoard(): ProgramBoard {
//   return {
//     ...createEmptyBoardItem(),
//     courses: [],
//   };
// }
