import { createSelector } from 'reselect';

/**
 * Direct selector to the gallery state domain
 */
const selectGalleryDomain = () => (state) => state.get('gallery');

/**
 * Other specific selectors
 */


/**
 * Default selector used by Gallery
 */
const initialState = {
  assetList: [],
  assetUploading: false,
  fetchingAllAssets: false,
};
const makeSelectGallery = () => createSelector(
    selectGalleryDomain(),
    (substate) => substate ? substate.toJS() : initialState
  );


export default makeSelectGallery;
export {
  selectGalleryDomain,
};
