import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'game/data/item_table.dart';
import 'game/data/enemy_table.dart';
import 'game/data/player_table.dart';
import 'providers/battle_provider.dart';
import 'screens/main_menu_screen.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await ItemTable.load();
  await EnemyTable.load();
  await PlayerTable.load();
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [ChangeNotifierProvider(create: (_) => BattleProvider())],
      child: MaterialApp(
        title: "Colosseum's Choice",
        theme: ThemeData.dark(),
        home: const MainMenuScreen(),
      ),
    );
  }
}
