import { IKeyOnlyAction } from 'src' ; import { IExtensionOptions , paneType } from "../../../utilities/interfaces" ; import { IKeyAction , IScreenOnlyAction , IKeyScreenAction } from "./key.interface" ; import { PUSH_KEY , POP_KEY , MOVE_TO_FRONT_KEY , REMOVE_KEY , CHANGE_SCREEN_KEY , POP_TO_FRONT_KEY } from "./key.types" ; export const pushKey = ( screen , key , isMerge , extensionOptions ? ) : IKeyAction => ( { type : PUSH_KEY , payload : { screen : screen , key : key , isMerge : isMerge , extensionOptions } } ) ; /**
 * Removes all elements of the stack and returns element in index 0
 */ export const popToFront = ( screen ) : IScreenOnlyAction => ( { type : POP_TO_FRONT_KEY , payload : { screen : screen } } ) ; /**
 * Go back one element in the stack
 */ export const popScreen = ( key ) : IKeyOnlyAction => ( { type : POP_KEY , payload : { key : key } } ) ; export const moveToFront = ( screen , key ) : IKeyScreenAction => ( { type : MOVE_TO_FRONT_KEY , payload : { screen : screen , key : key } } ) ; export const changeScreen = ( screen , key ) : IKeyScreenAction => ( { type : CHANGE_SCREEN_KEY , payload : { screen : screen , key : key } } ) ;