import { EMPTY_ARRAY , EMPTY_OBJ } from '../../utils/constants' ; import { RootState } from '../types' ; const s = ( state ) => state . navigation || EMPTY_OBJ ; export const modalStack = ( state ) => s ( state ) . modalStack || EMPTY_ARRAY ; export const currentOpenedModal = ( state ) => modalStack ( state ) && modalStack ( state ) ! . slice ( - 1 ) [ 0 ] ;