import { PlayerState } from "./player.reducer" ; import { AppState } from "../../app/app.state" ; import { createSelector } from 'reselect' ; export function getPlayerState ( state ) { return state . player ; } ; export function fetchVolume ( state ) { return state . volume ; } export function fetchIsShuffle ( state ) { return state . isShuffle ; } export function fetchIsRepeat ( state ) { return state . isRepeat ; } export function fetchIsPlaying ( state ) { return state . isPlaying ; } export function fetchIsMuted ( state ) { return state . isMuted ; } export function fetchCurrentTrack ( state ) { return state . currentTrack ; } export function fetchTracklistDownloaded ( state ) { return state . trackListDownloaded ; } export function fetchAudioState ( state ) { return state . audioState ; } export function fetchFaveIds ( state ) { return state . faveIds ; } export function fetchTrackFilter ( state ) { return state . trackFilter ; } export const getVolume = createSelector ( getPlayerState , fetchVolume ) ; export const isShuffle = createSelector ( getPlayerState , fetchIsShuffle ) ; export const isRepeat = createSelector ( getPlayerState , fetchIsRepeat ) ; export const isPlaying = createSelector ( getPlayerState , fetchIsPlaying ) ; export const isMuted = createSelector ( getPlayerState , fetchIsMuted ) ; export const getCurrentTrack = createSelector ( getPlayerState , fetchCurrentTrack ) ; export const isTracklistDownloaded = createSelector ( getPlayerState , fetchTracklistDownloaded ) ; export const getAudioState = createSelector ( getPlayerState , fetchAudioState ) ; export const getFaveIds = createSelector ( getPlayerState , fetchFaveIds ) ; export const getTrackFilter = createSelector ( getPlayerState , fetchTrackFilter ) ;