import { createSelector } from 'reselect';
import { fromJS } from 'immutable';

const selectFTPMessageCreateDomain = () => (state) => state.get('FTP') || fromJS({});
const selectCapDomain = (state) => state.get('cap');

const makeSelectFTP = () => createSelector(
  selectFTPMessageCreateDomain(),
  (substate = fromJS({})) => substate.toJS()
);
const makeSelectMetaEntities = () => createSelector(
  selectCapDomain,
  (globalState = fromJS({})) => globalState.get('metaEntities')
);


export {
  makeSelectFTP,
  makeSelectMetaEntities,
};
