import { createSelector } from 'reselect';

/**
 * Direct selector to the create state domain
 */
const selectViberDomain = () => (state) => state.get('templates');
const selectViberMessageEditDomain = () => (state) => state.get('viber');

const makeSelectViber = () => createSelector(
  selectViberDomain(),
  (substate) => substate && substate.toJS()
);

const makeSelectCreateViber = () => createSelector(
  selectViberMessageEditDomain(),
  (substate) => substate && substate.toJS()
);

export {
    makeSelectViber, makeSelectCreateViber,
};
