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

const nameSpace = slice.name;

export const liveEventsSelector = (state) => state[nameSpace].liveEvents;
export const totalEventsSelector = (state) => state[nameSpace].totalEvents;
export const selectedEventsSelector = (state) => state[nameSpace].selectedEvents;
export const playersSelector = (state) => state[nameSpace].players;
export const publishersSelector = (state) => state[nameSpace].publishers;
export const embedCodeSelector = (state) => state[nameSpace].embedCode;
export const searchSelector = (state) => state[nameSpace].search;
export const pageSelector = (state) => state[nameSpace].page;
export const pageSizeSelector = (state) => state[nameSpace].pageSize;
export const sortBySelector = (state) => state[nameSpace].sortBy;
export const sortOrderSelector = (state) => state[nameSpace].sortOrder;
export const eventFilterSelector = (state) => state[nameSpace].eventFilter;
export const statusSelector = (state) => state[nameSpace].status;
export const publisherIdSelector = (state) => state[nameSpace].publisherId;
export const playerIdSelector = (state) => state[nameSpace].playerId;

export const queryParamsSelector = (state) => ({
  search: state[nameSpace].search,
  page: state[nameSpace].page,
  pageSize: state[nameSpace].pageSize,
  status: state[nameSpace].status,
  sortBy: state[nameSpace].sortBy,
  sortOrder: state[nameSpace].sortOrder,
  playerId: state[nameSpace].playerId,
  eventFilter: state[nameSpace].eventFilter,
  publisherId: state[nameSpace].publisherId,
});
