import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'app.dart';
import 'core/themes/app_theme.dart';
import 'core/controllers/theme_controller.dart';

void main() {
  // Initialize theme controller
  Get.put(ThemeController());
  
  runApp(const LuckyChitApp());
}

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

  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(375, 812), // Mobile-first design size (iPhone X)
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
        return GetMaterialApp(
          title: 'LuckyChit',
          debugShowCheckedModeBanner: false,
          theme: AppTheme.lightTheme,
          darkTheme: AppTheme.darkTheme,
          themeMode: ThemeController.to.themeMode,
          home: const App(),
        );
      },
    );
  }
}
