2018-05-15 14:50:21 +00:00
|
|
|
/* @flow */
|
|
|
|
import type { ResetSimulationAction } from './types/Actions'
|
|
|
|
|
2017-01-10 18:22:44 +00:00
|
|
|
// The input "conversation" is composed of "steps"
|
|
|
|
// The state keeps track of which of them have been submitted
|
|
|
|
// The user can also come back to one of his answers and edit it
|
|
|
|
export const STEP_ACTION = 'STEP_ACTION'
|
2018-05-15 14:50:21 +00:00
|
|
|
|
|
|
|
// $FlowFixMe
|
2018-01-30 13:50:47 +00:00
|
|
|
export function stepAction(name, step, source) {
|
|
|
|
return { type: STEP_ACTION, name, step, source }
|
2017-01-10 18:22:44 +00:00
|
|
|
}
|
|
|
|
|
2018-05-15 14:50:21 +00:00
|
|
|
export function resetSimulation(): ResetSimulationAction {
|
|
|
|
return {
|
|
|
|
type: 'RESET_SIMULATION'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// $FlowFixMe
|
2018-02-22 16:23:47 +00:00
|
|
|
export function setExample(name, situation) {
|
|
|
|
return { type: 'SET_EXAMPLE', situation, name }
|
|
|
|
}
|
|
|
|
|
2017-01-10 18:22:44 +00:00
|
|
|
export const START_CONVERSATION = 'START_CONVERSATION'
|
|
|
|
|
|
|
|
export const CHANGE_THEME_COLOUR = 'CHANGE_THEME_COLOUR'
|
2018-05-15 14:50:21 +00:00
|
|
|
|
|
|
|
// $FlowFixMe
|
2018-01-03 15:54:19 +00:00
|
|
|
export function changeThemeColour(colour) {
|
|
|
|
return { type: CHANGE_THEME_COLOUR, colour }
|
|
|
|
}
|
2017-02-08 16:50:22 +00:00
|
|
|
|
2017-02-09 17:15:25 +00:00
|
|
|
export const EXPLAIN_VARIABLE = 'EXPLAIN_VARIABLE'
|
2018-03-29 11:38:55 +00:00
|
|
|
export const CHANGE_LANG = 'CHANGE_LANG'
|