import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart';
import 'package:sigap/splash_screen.dart';
import 'package:sigap/src/cores/bindings/app_bindings.dart';
import 'package:sigap/src/cores/routes/app_pages.dart';
import 'package:sigap/src/utils/constants/text_strings.dart';
import 'package:sigap/src/utils/theme/theme.dart';

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: TTexts.appName,
      themeMode: ThemeMode.system, // This will follow system theme settings
      theme: TAppTheme.lightTheme,
      darkTheme: TAppTheme.darkTheme,
      debugShowCheckedModeBanner: false,
      initialBinding: AppBindings(),
      localizationsDelegates: GlobalMaterialLocalizations.delegates,
      supportedLocales: const [Locale('id', '')],
      getPages: AppPages.routes,
      home: const AnimatedSplashScreenWidget(),
    );
  }
}
