import 'package:citycards_customer/common_packages/custom_filled_button.dart';
import 'package:citycards_customer/common_packages/custom_text.dart';
import 'package:citycards_customer/itinerary_creation/bloc/itinerary_steps_selection_bloc.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class EnergySelectionView extends StatelessWidget {
  EnergySelectionView({super.key});

  final List<Map<String, String>> options = [
    {"img": "assets/icons/relaxed.png", "name": "Relaxed & Chill"},
    {"img": "assets/icons/balanced.png", "name": "Balanced Mix"},
    {"img": "assets/icons/active.png", "name": "Active & Energetic"},
    {"img": "assets/icons/adventure.png", "name": "Full Adventure"},
  ];

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text(
          "👋 Hello! We'd love to know more about you. What kind of energy are you after on this trip?",
          style: TextStyle(
            color: Color(0xFF101828),
            fontSize: 24.sp,
            fontWeight: FontWeight.w500,
          ),
          textAlign: TextAlign.center,
        ),
        SizedBox(height: 32.h),
        ...List.generate(options.length, (index) {

          final item = options[index];
          return Padding(
            padding: EdgeInsets.only(bottom: 12.h),
            child: GestureDetector(
              onTap: (){
                context.read<ItineraryStepNavigationBloc>().add(
                  ItineraryStepNavigationNextEvent(),
                );
              },
              child: Container(
                height: 86.h,
                padding: EdgeInsets.symmetric(horizontal: 24.w),
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(28.r),
                ),
                alignment: Alignment.center,
                child: Row(
                  children: [
                    Image.asset(item['img'] ?? "",scale: 4,),
                    SizedBox(width: 15,),
                    CustomText(
                      text: item['name'] ?? "",
                      size: 14.sp,
                      color:  const Color(0xFF101828),
                      weight: FontWeight.w500,
                    ),
                  ],
                ),
              ),
            ),
          );
        }),

      ],
    );
  }
}
