import 'package:flutter/material.dart';
import 'widgets/header_widget.dart';
import 'widgets/hero_section_widget.dart';
import 'widgets/search_bar_widget.dart';
import 'widgets/popular_places_widget.dart';
import 'widgets/recommendation_widget.dart';
import 'widgets/bottom_navigation_widget.dart';
import 'theme/app_theme.dart';

void main() {
  runApp(const TravelApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Travel Discovery',
      theme: AppTheme.lightTheme,
      home: const TravelHomePage()
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppTheme.backgroundColor,
      body: SafeArea(
        child: Column(
          children: [
            Expanded(
              child: SingleChildScrollView(
                child: Column(
                  children: [
                    SizedBox(
                      height: MediaQuery.of(context).size.height * 0.5,
                      child: const HeroSectionWidget(),
                    ),
                    
                    const SizedBox(height: 20),
                    
                    const PopularPlacesWidget(),
                    
                    const SizedBox(height: 20),
                    
                    const RecommendationWidget(),
                    
                    const SizedBox(height: 20),
                  ],
                ),
              ),
            ),
            
            const BottomNavigationWidget(),
          ],
        ),
      ),
    );
  }

}