<commit_before>/* eslint-disable import/prefer-default-export */
/**
 * mSupply Mobile
 * Sustainable Solutions (NZ) Ltd. 2019
 */

import {
  CellActionsLookup,
  editCountedQuantityWithReason,
  editStocktakeBatchCountedQuantityWithReason,
} from './cellActions';
import { RowActionsLookup } from './rowActions';
import { TableActionsLookup } from './tableActions';
import { PageActionsLookup } from './pageActions';

/**
 * Serves a page the actions it requires given it's routeName.
 *
 * Actions can be overriden if different behaviour is required for
 * a particular action in a given circumstance.
 *
 * I.E When reasons are defined, `editCountedQuantity` should be
 * replaced with the action `editCountedQuantityWithReason`.
 *
 */

/**
 * Standard base page actions.
 */
const BasePageActions = {
  ...CellActionsLookup,
  ...RowActionsLookup,
  ...TableActionsLookup,
  ...PageActionsLookup,
};

/**
 * Actions for `stocktakeEditPage` when reasons are defined.
 */
const stocktakeEditorWithReasons = {
  ...BasePageActions,
  editCountedQuantity: editCountedQuantityWithReason,
};

const stocktakeBatchEditModalWithReasons = {
  ...BasePageActions,
  editCountedQuantity: editStocktakeBatchCountedQuantityWithReason,
};

/**
 * If actions need to be overriden for a particular routeName,
 * adding them here will pass that new set of actions to the<commit_msg>Add updated override for reasons counted total quantity<commit_after>/* eslint-disable import/prefer-default-export */
/**
 * mSupply Mobile
 * Sustainable Solutions (NZ) Ltd. 2019
 */

import {
  CellActionsLookup,
  editCountedQuantityWithReason,
  editStocktakeBatchCountedQuantityWithReason,
} from './cellActions';
import { RowActionsLookup } from './rowActions';
import { TableActionsLookup } from './tableActions';
import { PageActionsLookup } from './pageActions';

/**
 * Serves a page the actions it requires given it's routeName.
 *
 * Actions can be overriden if different behaviour is required for
 * a particular action in a given circumstance.
 *
 * I.E When reasons are defined, `editCountedQuantity` should be
 * replaced with the action `editCountedQuantityWithReason`.
 *
 */

/**
 * Standard base page actions.
 */
const BasePageActions = {
  ...CellActionsLookup,
  ...RowActionsLookup,
  ...TableActionsLookup,
  ...PageActionsLookup,
};

/**
 * Actions for `stocktakeEditPage` when reasons are defined.
 */
const stocktakeEditorWithReasons = {
  ...BasePageActions,
  editCountedQuantity: editCountedQuantityWithReason,
};

const stocktakeBatchEditModalWithReasons = {
  ...BasePageActions,
  editStocktakeBatchCountedQuantity: editStocktakeBatchCountedQuantityWithReason,
};

/**
 * If actions need to be overriden for a particular routeName,
 * adding them here will pass that new set of actions to the
{'fraction_non_alphanumeric': 0.09792709077912795, 'fraction_numerical': 0.0028591851322373124, 'mean_word_length': 4.488235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6885031', 'n_tokens_mistral': 800, 'n_tokens_neox': 760, 'n_words': 240}