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

  final List<Map<String, String>> options = [
    {"icon": "😐", "name": "Not my thing"},
    {"icon": "📸", "name": "If we have time"},
    {"icon": "😍", "name": "Yes, definitely!"},
    {"icon": "🌄", "name": "Must-have!"},
  ];

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text(
          "👋 Hello! We'd love to know more about you. Do you enjoy visiting museums and art galleries?",
          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(
                padding: EdgeInsets.symmetric(horizontal: 24.w),
                height: 83.h,
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(28.r),
                ),
                alignment: Alignment.center,
                child: Row(
                  children: [
                    CustomText(
                      text: item['icon'] ?? "",
                      size: 36.sp,
                      color: const Color(0xFF101828),
                      weight: FontWeight.w500,
                    ),
                    SizedBox(width: 16.w,),
                    CustomText(
                      text: item['name'] ?? "",
                      size: 16.sp,
                      color: const Color(0xFF101828),
                      weight: FontWeight.w500,
                    ),
                  ],
                ),
              ),
            ),
          );
        }),
      ],
    );
  }
}
