import { ActionType , WAVEFORM_CHANGE , RECORDER_STATE_CHANGE , PLAYER_STATE_CHANGE , SLIDER_CHANGE , DOWNLOAD_MODAL_CHANGE , START_MODAL_CHANGE , PLAY_BUTTON_DISABLED_CHANGE , } from '../Constants/ActionTypes' ; import { RecordStateType , PlayerStateType } from '../Constants/AppTypings' ; export interface IAction { type : ActionType ; } export function Waveform ( wave ) { return { type : WAVEFORM_CHANGE , wave , } ; } export function PlayerStateChange ( playerState ) { return { type : PLAYER_STATE_CHANGE , playerState , } ; } export function RecorderStateChange ( recordState ) { return { type : RECORDER_STATE_CHANGE , recordState , } ; } export function PlayButtonDisabled ( isDisabled ) { return { type : PLAY_BUTTON_DISABLED_CHANGE , isDisabled , } ; } export function SliderAction ( sliderName , value ) { return { type : SLIDER_CHANGE , sliderName , value , } ; } export function downloadModalChange ( value ) { return { type : DOWNLOAD_MODAL_CHANGE , value , } ; } export function startModalChange ( value ) { return { type : START_MODAL_CHANGE , value , } ; }