import { List , Map } from 'immutable' ; import { IMenu , IMenuItem , MenuItemRecord } from './menu.types' ; export function deimmutifyMenu ( state ) { return state . toJS ( ) ; } export function reimmutifyMenu ( plain ) { return List < IMenuItem > ( plain ? plain . map ( MenuItemRecord ) : [ ] ) ; }