import { WolfState , SlotId , PromptSlot , SlotStatus , SlotData } from '../types' ; export const getAbilitiesCompleteOnCurrentTurn = ( state ) : string [ ] => { return state . abilitiesCompleteOnCurrentTurn ; } ; export const getfilledSlotsOnCurrentTurn = ( state ) : SlotId [ ] => { return state . filledSlotsOnCurrentTurn ; } ; export const getPromptedSlotStack = ( state ) : PromptSlot [ ] => { return state . promptedSlotStack ; } ; export const getFocusedAbility = ( state ) : string | null => { return state . focusedAbility ; } ; export const getDefaultAbility = ( state ) : string | null => { return state . defaultAbility ; } ; export const getSlotStatus = ( state ) : SlotStatus [ ] => { return state . slotStatus ; } ; export const getSlotData = ( state ) : SlotData [ ] => { return state . slotData ; } ; export const getUnfilledEnabledSlots = ( state , focusedAbility ) : SlotId [ ] => { const slotStatus = state . slotStatus ; const slotStatusInFocusedAbility = slotStatus . filter ( _ => _ . abilityName === focusedAbility ) ; return slotStatusInFocusedAbility . filter ( _ => _ . isEnabled ) . filter ( _ => ! _ . isDone ) . map ( ( { slotName , abilityName } ) => ( { slotName , abilityName } ) ) ; } ;