import { getItem, saveItem } from './StorageHelper.ts';
import NavigationManager from '../../specs/NativeNavigationManager.ts';

export enum Apps {
  App = 'app',
  Hospital = 'hospital',
  Ywq = 'ywq',
}

export const NavigationPushByName = (name: string, params: any) => {
  saveItem(`MessageActivity-${name}`, params).finally(() => {
    NavigationManager.navigate(name);
  });
};
export const NavigationPop = () => {
  NavigationManager.pop();
};
export const getDataFromName = (name: string) =>
  getItem(`MessageActivity-${name}`);
