import React, { useEffect } from 'react';
import { StatusBar, useColorScheme, SafeAreaView, View } from 'react-native';
// import { showPluginUI, QmsDashboardView } from 'QmsPlugin';
import { QmsDashboardView } from 'QmsPlugin';

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

  // useEffect(() => {
  //   console.log('🚀 Launching plugin UI immediately...');
  //   try {
  //     showPluginUI();
  //   } catch (e) {
  //     console.error('❌ Error launching plugin UI:', e);
  //   }
  // }, []);

  return (
    <SafeAreaView>
      <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
      <View style={{ flex: 1 }}>
        <QmsDashboardView style={{ flex: 1 }} />
      </View>
    </SafeAreaView>
  );
}

export default App;
