import { IJSONKifuFormat , IMoveMoveFormat } from "json-kifu-format/dist/src/Formats" ; import { Path } from "./models" ; export const REQUEST_GET_JKF = "REQUEST_GET_JKF" ; export const RECEIVE_GET_JKF = "RECEIVE_GET_JKF" ; export const REQUEST_PUT_JKF = "REQUEST_PUT_JKF" ; export const RECEIVE_PUT_JKF = "RECEIVE_PUT_JKF" ; export const FAIL_PUT_JKF = "FAIL_PUT_JKF" ; export const CLEAR_MESSAGE = "CLEAR_MESSAGE" ; export const CHANGE_AUTO_SAVE = "CHANGE_AUTO_SAVE" ; export const MOVE_PIECE = "MOVE_PIECE" ; export const CHANGE_COMMENTS = "CHANGE_COMMENTS" ; export const UPDATE_COMMENTS = "UPDATE_COMMENTS" ; export const GOTO_PATH = "GOTO_PATH" ; export const MOVE_UP_FORK = "MOVE_UP_FORK" ; export const MOVE_DOWN_FORK = "MOVE_DOWN_FORK" ; export const REMOVE_FORK = "REMOVE_FORK" ; export function requestGetJKF ( ) { return { type : REQUEST_GET_JKF } ; } export function receiveGetJKF ( jkf ) { return { type : RECEIVE_GET_JKF , jkf : jkf } ; } export function requestPutJKF ( ) { return { type : REQUEST_PUT_JKF } ; } export function receivePutJKF ( ) { return { type : RECEIVE_PUT_JKF } ; } export function failPutJKF ( e ) { return { type : FAIL_PUT_JKF , error : e } ; } export function clearMessage ( ) { return { type : CLEAR_MESSAGE } ; } export function changeAutoSave ( enabled ) { return { type : CHANGE_AUTO_SAVE , enabled : enabled } ; } export function inputMove ( move ) { return { type : MOVE_PIECE , move : move } ; } export function changeComments ( value ) { return { type : CHANGE_COMMENTS , value : value } ; } export function updateComments ( ) { return { type : UPDATE_COMMENTS } ; } export function gotoPath ( path ) { return { type : GOTO_PATH , path : path } ; } export function moveUpFork ( path ) { return { type : MOVE_UP_FORK , path : path } ; } export function moveDownFork ( path ) { return { type : MOVE_DOWN_FORK , path : path } ; } export function removeFork ( path ) { return { type : REMOVE_FORK , path : path } ; }