import React from 'react';
import { AllPlaylistContextInterface, AllPlaylistInterface } from './AllPlaylistsContext';

export const useAllPlaylists = (): AllPlaylistContextInterface => {
  const [allPlaylists, _setAllPlaylists] = React.useState<AllPlaylistInterface[] | []>([
    // {rowid: 1, name: 'playlist', input: 'string'},
    // {rowid: 11, name: 'playlist2', input: 'string'},
    // {rowid: 12, name: 'playlist3', input: 'string'},
    // {rowid: 13, name: 'playlist4', input: 'string'},
    // {rowid: 14, name: 'playlist5', input: 'string'},
    // {rowid: 15, name: 'playlist6', input: 'string'},
    // {rowid: 16, name: 'playlist7', input: 'string'},
    // {rowid: 17, name: 'playlist9', input: 'string'},
  ]);
  const setAllPlaylists = React.useCallback((currentAllPlaylists: AllPlaylistInterface[]): void => {
    _setAllPlaylists(currentAllPlaylists);
  }, []);

  return {
    allPlaylists,
    setAllPlaylists,
  };
};
