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

const nameSpace = slice.name;

export const selectedVideoSelector = (state) => state[nameSpace].selectedVideo;
export const monitoringJobSelector = (state) => state[nameSpace].monitoringJob;
export const currentVideoTimeSelector = (state) => state[nameSpace].currentVideoTime;
export const updateVideoSelector = (state) => state[nameSpace].updateVideo;
export const evergreenSelector = (state) => state[nameSpace].evergreen;
export const dialogVisibleSelector = (state) => state[nameSpace].dialogVisible;
export const getPlayerEmbedCodeSelector = (state) => state[nameSpace].getPlayerEmbedCode;
export const keywordsSelector = (state) => state[nameSpace].keywords;
export const isLoadingKeywordsSelector = (state) => state[nameSpace].isLoadingKeywords;
export const newKeywordSelector = (state) => state[nameSpace].newKeyword;
export const getTaxonomyKeywordsSelector = (state) => state[nameSpace].getTaxonomyKeywords;
export const createTaxonomyKeywordSelector = (state) => state[nameSpace].createTaxonomyKeyword;
export const showNotificationSelector = (state) => state[nameSpace].showNotification;
export const deleteVideoSelector = (state) => state[nameSpace].deleteVideo;
export const speechToTextModelSelector = (state) => state[nameSpace].speechToTextModel;
export const speechToTextModelsSelector = (state) => state[nameSpace].speechToTextModels;
export const downloadTagsSelector = (state) => state[nameSpace].downloadTags;
export const getOwnersOptionsSelector = (state) => state[nameSpace].getOwnersOptions;
export const ownersOptionsSelector = (state) => state[nameSpace].ownersOptions;
export const tabIndexSelector = (state) => state[nameSpace].tabIndex;
export const advertiserOptionsSelector = (state) => state[nameSpace].advertiserOptions;

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

  return {
    ...state,
  };
};

export const isChaptersMonitoringActive = (state) => state[nameSpace].isChaptersMonitoringActive;

export default getCommonState;
