import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:citycards_customer/common_packages/custom_text.dart';
import 'package:citycards_customer/common_packages/custom_filled_button.dart';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xFFFFF5F5),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Column(
              children: [
                SizedBox(height: 26.h),
                CustomText(text: "🎉", size: 60.sp),
                SizedBox(height: 32.h),
                Text(
                  "All set! Your travel profile is complete",
                  textAlign: TextAlign.center,
                  style: TextStyle(
                    color: const Color(0xFF101828),
                    fontSize: 24.sp,
                    fontWeight: FontWeight.w500,
                  ),
                ),
                SizedBox(height: 4.h),
                Text(
                  "We’ve got everything we need to plan your perfect trip",
                  style: TextStyle(color: Color(0xFF6A7282), fontSize: 14),
                  textAlign: TextAlign.center,
                ),
                SizedBox(height: 32.h),
                Container(
                  width: double.infinity,
                  padding: EdgeInsets.symmetric(
                    horizontal: 16.w,
                    vertical: 20.h,
                  ),
                  decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.circular(24.r),
                    border: Border.all(color: Color(0xFFF3F4F6), width: 1.1),
                  ),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      CustomText(
                        text: "Your Profile:",
                        size: 16.sp,
                        weight: FontWeight.w500,
                        color: const Color(0xFF364153),
                      ),
                      SizedBox(height: 16.h),
                      _buildProfileRow("Visit Date", "Oct 15, 2025"),
                      _buildProfileRow("City", "Tokyo"),
                      _buildProfileRow("Energy", "Relaxed"),
                      _buildProfileRow("With kids", "Yes"),
                      _buildProfileRow("Dietary", "Vegan"),
                      _buildProfileRow("Museums", "⭐"),
                      _buildProfileRow("Scenic", "⭐"),
                      _buildProfileRow("Cultural", "⭐⭐⭐"),
                      _buildProfileRow("Wildlife", "⭐⭐"),
                      _buildProfileRow("Shopping", "⭐⭐⭐"),
                    ],
                  ),
                ),
                SizedBox(height: 32.h),
                OutlinedButton(
                  style: OutlinedButton.styleFrom(
                    side: const BorderSide(
                      color: Color(0xFFE5E7EB),
                      width: 1.1,
                    ),
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(40),
                    ),
                    minimumSize: Size(double.infinity, 42.h),
                  ),
                  onPressed: () {
                    // Reset or restart flow
                  },
                  child: CustomText(
                    text: "Start Over",
                    size: 16.sp,
                    color: const Color(0xFF364153),
                  ),
                ),
                SizedBox(height: 12.h),
                CustomFilledButton(
                  width: double.infinity,
                  label: "Get My Trip Plan",
                  showArrow: true,
                  onTap: () {
                    // Navigate to next step
                  },
                ),
              ],
            ),
            SizedBox(height: 32.h),

            // Profile summary card
          ],
        ),
      ),
    );
  }

  Widget _buildProfileRow(String title, String value) {
    return Container(
      height: 44.h,
      margin: EdgeInsets.only(bottom: 8.h),
      padding: EdgeInsets.symmetric(horizontal: 12.w),
      decoration: BoxDecoration(
        color: const Color(0xFFF9FAFB),
        borderRadius: BorderRadius.circular(16.r),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          CustomText(text: title, size: 14.sp, color: const Color(0xFF4A5565)),
          CustomText(
            text: value,
            size: 14.sp,
            weight: FontWeight.w400,
            color: const Color(0xFF101828),
          ),
        ],
      ),
    );
  }
}
