import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_app/features/menu/view/widgets/securty/bloc/security_bloc.dart';
import 'package:syncrow_app/features/menu/view/widgets/securty/view/verification_code_page.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
import 'package:syncrow_app/generated/assets.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';

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

  @override
  Widget build(BuildContext context) {
    return DefaultScaffold(
      title: 'Change Password',
      bottomNavBar: SizedBox(
        height: 150,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            InkWell(
              onTap: () {
                // In your parent widget or navigator
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => BlocProvider(
                      create: (_) => SecurityBloc(), // Provide the Bloc
                      child: const VerificationCodePage(),
                    ),
                  ),
                );
              },
              child: Container(
                height: 50,
                margin: const EdgeInsets.only(right: 20, left: 20),
                decoration: const BoxDecoration(
                    color: ColorsManager.blueColor,
                    borderRadius: BorderRadius.all(Radius.circular(20))),
                child: const Center(
                    child: Text(
                  'Get Verification Code',
                  style: TextStyle(
                      fontSize: 16,
                      fontWeight: FontWeight.w700,
                      color: ColorsManager.onPrimaryColor),
                )),
              ),
            ),
          ],
        ),
      ),
      child: Column(
        children: [
          Padding(
            padding: const EdgeInsets.only(top: 80, bottom: 30),
            child: SvgPicture.asset(Assets.verificationIcon),
          ),
          const Padding(
            padding: EdgeInsets.all(8.0),
            child: BodyMedium(
              text: 'Account Verification',
              fontWeight: FontWeight.w700,
              fontSize: 18,
            ),
          ),
          const BodyMedium(
            text: 'Click here to send a verification ',
            fontWeight: FontWeight.w400,
            fontSize: 16,
          ),
          const SizedBox(
            height: 4,
          ),
          const BodyMedium(
            text: 'code to your email: test@test.com',
            fontWeight: FontWeight.w400,
            fontSize: 16,
          ),
        ],
      ),
    );
  }
}
