import { slice } from '../slices';

const nameSpace = slice.name;

export const querySelector = (state) => state[nameSpace].query;
export const fromSuggesterSelector = (state) => state[nameSpace].fromSuggester;
export const playlistTypeSelector = (state) => state[nameSpace].playlistType;
export const searchSuggesterSelector = (state) => state[nameSpace].searchSuggester;
export const suggesterOptionsSelector = (state) => state[nameSpace].suggesterOptions;

export const getCommonState = (state$) => {
  const state = state$[nameSpace];

  return {
    ...state,
  };
};

export default getCommonState;
