import { createSelector } from 'reselect';

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

const selectTemplateDomain = () => (state) => state.get('templates');
export const makeSelectTemplate = () => createSelector(
  selectTemplateDomain(),
  (substate) => substate && substate.toJS()
);
/**
 * Other specific selectors
 */


/**
 * Default selector used by Facebook
 */

export const makeSelectMarketingObjectiveList = () => createSelector(
  selectFacebookDomain(),
  (substate) => substate && substate.get('marketinObjectivesData'),
);

export const makeSelectFbAd = () => createSelector(
  selectFacebookDomain(),
  (substate) => substate && substate.toJS()
);
