import { dayjs } from '@/lib/dayjs';

export interface LessonCategory {
  isEmpty?: boolean;
  //
  id: string;
  cat_name: string;
  cat_image_url?: string;
  cat_image?: string;
  pos: number;
  visible: string;
  lesson_id: string;
  description: string;
  remarks: string;
  //
  name: string;
  avatar: string;
  email: string;
  phone: string;
  quota: number;
  status: 'pending' | 'active' | 'blocked' | 'NA';
  createdAt: Date;
}

export const defaultLessonCategory: LessonCategory = {
  isEmpty: false,
  id: 'default-id',
  cat_name: 'default-category-name',
  cat_image_url: undefined,
  cat_image: undefined,
  pos: 0,
  visible: 'hidden',
  lesson_id: 'default-lesson-id',
  description: 'default-description',
  remarks: 'default-remarks',
  //
  createdAt: dayjs('2099-01-01').toDate(),
  //
  name: '',
  avatar: '',
  email: '',
  phone: '',
  quota: 0,
  status: 'NA',
};

export const emptyLessonCategory: LessonCategory = {
  ...defaultLessonCategory,
  isEmpty: true,
};

export interface CreateForm {
  name: string;
  type: string;
  pos: number;
  visible: string;
}

export const LessonCategoryCreateFormDefault: CreateForm = {
  name: '',
  type: '',
  pos: 1,
  visible: 'visible',
};
