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

const nameSpace = slice.name;

/** @deprecated */
export const getCommonState = (state$) => {
  const state = state$[nameSpace];

  return {
    ...state,
  };
};

export const idSelector = (state) => state[nameSpace].id;
export const nameSelector = (state) => state[nameSpace].name;
export const descriptionSelector = (state) => state[nameSpace].description;
export const timezoneSelector = (state) => state[nameSpace].timezone;
export const regionSelector = (state) => state[nameSpace].region;
export const deliverySelector = (state) => state[nameSpace].delivery;
export const urlSelector = (state) => state[nameSpace].url;
export const rtmpInputUrlSelector = (state) => state[nameSpace].rtmpInputUrl;
export const rtmpSecondaryInputUrlSelector = (state) => state[nameSpace].rtmpSecondaryInputUrl;
export const rtmpStreamKeySelector = (state) => state[nameSpace].rtmpStreamKey;
export const rtmpSecondaryStreamKeySelector = (state) => state[nameSpace].rtmpSecondaryStreamKey;
export const statusSelector = (state) => state[nameSpace].status;
export const schedulesSelector = (state) => state[nameSpace].schedules;
export const scheduleErrorsSelector = (state) => state[nameSpace].scheduleErrors;
export const streamIdSelector = (state) => state[nameSpace].streamId;
export const indicationTextSelector = (state) => state[nameSpace].indicationText;
export const indicationColorSelector = (state) => state[nameSpace].indicationColor;
export const publisherIdSelector = (state) => state[nameSpace].publisherId;
export const contentOwnerIdSelector = (state) => state[nameSpace].contentOwnerId;
export const playerIdSelector = (state) => state[nameSpace].playerId;
export const userIdSelector = (state) => state[nameSpace].userId;
export const playerAspectRatioSelector = (state) => state[nameSpace].playerAspectRatio;
export const guidSelector = (state) => state[nameSpace].guid;
export const preEventTextSelector = (state) => state[nameSpace].preEventText;
export const preEventTypeSelector = (state) => state[nameSpace].preEventType;
export const preEventIdSelector = (state) => state[nameSpace].preEventId;
export const postEventTextSelector = (state) => state[nameSpace].postEventText;
export const postEventTypeSelector = (state) => state[nameSpace].postEventType;
export const postEventIdSelector = (state) => state[nameSpace].postEventId;
export const transitionTextSelector = (state) => state[nameSpace].transitionText;
export const countdownSelector = (state) => state[nameSpace].countdown;
export const preEventImagesSelector = (state) => state[nameSpace].preEventImages;
export const postEventImagesSelector = (state) => state[nameSpace].postEventImages;
export const publishersSelector = (state) => state[nameSpace].publishers;
export const publisherSelector = (state) => state[nameSpace].publisher;
export const playersSelector = (state) => state[nameSpace].players;
export const isLoadingSelector = (state) => state[nameSpace].isLoading;
export const errorsSelector = (state) => state[nameSpace].errors;
export const isEditContinueSelector = (state) => state[nameSpace].isEditContinue;
export const embedCodeSelector = (state) => state[nameSpace].embedCode;
export const activeTabIdSelector = (state) => state[nameSpace].activeTabId;
export const createdPreEventPlaylistSelector = (state) => state[nameSpace].createdPreEventPlaylist;
export const createdPostEventPlaylistSelector = (state) => state[nameSpace].createdPostEventPlaylist;
export const playerConfigSelector = (state) => state[nameSpace].playerConfig;
export const eventStatusSelector = (state) => state[nameSpace].eventStatus;
export const liveStreamRequestFailedSelector = (state) => state[nameSpace].liveStreamRequestFailed;
export const liveCcEnabledSelector = (state) => state[nameSpace].liveCcEnabled;
export const liveCcLangSelector = (state) => state[nameSpace].liveCcLang;
export const isTimezoneDisabledSelector = (state) => state[nameSpace].isTimezoneDisabled;
export const recurrentPeriodSelector = (state) => state[nameSpace].recurrentPeriod;
export const recurrentEndDateSelector = (state) => state[nameSpace].recurrentEndDate;
export const displayViewersCounterSelector = (state) => state[nameSpace].displayViewersCounter;
export const viewersAmountSelector = (state) => state[nameSpace].viewersAmount;
export const forcePosterSelector = (state) => state[nameSpace].forcePoster;
export const forcePosterTypeSelector = (state) => state[nameSpace].forcePosterType;
export const prevValueSelector = (state) => state[nameSpace].prevValue;

export const tmPlaylistSelector = (state) => state[nameSpace].tmPlaylist;
export const playerSelector = (state) => state[nameSpace].player;
export const recurrentSelector = (state) => state[nameSpace].recurrent;
export const publisherInfoSelector = (state) => state[nameSpace].publisherInfo;
export const liveEventSchedulesSelector = (state) => state[nameSpace].liveEventSchedules;
export const aspectRatioSelector = (state) => state[nameSpace].aspectRatio;
