import { createContext } from 'react';

export interface AllPlaylistInterface {
  rowid: number;
  name: string;
  description: string;
  input: string;
  problemFiles: string[];
}

export interface AllPlaylistContextInterface {
  allPlaylists: AllPlaylistInterface[] | [],
  setAllPlaylists: (allPlaylists: AllPlaylistInterface[]) => void,
}

export const allPlaylistsInit: AllPlaylistContextInterface = {
  allPlaylists: [],
  setAllPlaylists: (allPlaylists: AllPlaylistInterface[]) => void 0,
}

export const AllPlaylistsContext = createContext<AllPlaylistContextInterface>(allPlaylistsInit);