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 HistoricalSiteRatingView extends StatelessWidget {
  HistoricalSiteRatingView({super.key});

  final List<Map<String, String>> historicalRatingOption = [
    {"icon": "assets/icons/hi_rate1.png", "option": "Not interested"},
    {"icon": "assets/icons/hi_rate2.png", "option": "A few key sites"},
    {"icon": "assets/icons/hi_rate3.png", "option": "Yes, I enjoy them!"},
    {"icon": "assets/icons/hi_rate4.png", "option": "Can't miss them!"},
  ];

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        CustomText(text: "🏛️", size: 36.sp),
        SizedBox(height: 9.h),
        Text(
          "Do you enjoy cultural landmarks and historical sites?",
          style: TextStyle(
            color: Color(0xFF101828),
            fontSize: 24.sp,
            fontWeight: FontWeight.w500,
          ),
          textAlign: TextAlign.center,
        ),
        SizedBox(height: 30.h),
        ...List.generate(historicalRatingOption.length, (index) {
          final item = historicalRatingOption[index];
          return Padding(
            padding: EdgeInsets.only(bottom: 12.h),
            child: GestureDetector(
              onTap: () {
                context.read<ItineraryStepNavigationBloc>().add(
                  ItineraryStepNavigationNextEvent(),
                );
              },
              child: Container(
                padding: EdgeInsets.symmetric(horizontal: 24.w),
                height: 82.h,
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(16.r),
                  border: Border.all(
                    color: Color(0xFFE5E7EB),
                    width: 1.1
                  ),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.black12,
                      offset: Offset(1,2),
                      blurRadius: 1,
                    )
                  ]
                ),
                alignment: Alignment.center,
                child: Row(
                  children: [
                    Image.asset(item['icon']?? "", scale: 4,),
                    SizedBox(width: 16.w,),
                    CustomText(
                      text: item['option'] ?? "",
                      size: 16.sp,
                      color: const Color(0xFF101828),
                      weight: FontWeight.w500,
                    ),
                  ],
                ),
              ),
            ),
          );
        }),
      ],
    );
  }
}
