/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */

import {
  Button,
  StatusBar,
  StyleSheet,
  Text,
  useColorScheme,
  View,
} from 'react-native';
import { NavigationPop } from '@common/NavigationHelper.ts';
import { showMessage } from '@common/ToastHelper.ts';
import Toast from 'react-native-toast-message';
import { versionName } from '@hospital/hospital.ts';

function HospitalMain() {
  const isDarkMode = useColorScheme() === 'dark';

  return (
    <View style={styles.container}>
      <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
      <View style={{ height: 100 }} />
      <Text>互联网医院{versionName}</Text>
      <Button
        title={'返回'}
        onPress={() => {
          NavigationPop();
        }}
      />
      <View style={{ height: 15 }} />
      <Button
        title={'Toast'}
        onPress={() => {
          showMessage('互联网医院弹出toast', 'info', 'common向下兼容');
        }}
      />
      <Toast />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

export default HospitalMain;
