import { SET_LOGBOOK_CONTEXT } from '../constants/actionTypes';

/**
 * Set the logbook context ie the context in which the logbook is used. Here the context corresponds to :
 * - 'proposal': indicating that the logbook is associated to a proposal
 * - 'dataCollection': indicating that the logbook is associated to a dataCollection
 * - 'dataset': indicating that the logbook is associated to a dataset
 * @param {*} context the context object for which the logbook is run.
 */
export function setLogbookContextAction(context) {
  return {
    type: SET_LOGBOOK_CONTEXT,
    context,
  };
}
