import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class EmailSentScreen extends ConsumerWidget {
  final String email;

  const EmailSentScreen({super.key, required this.email});

  @override
  Widget build(BuildContext contex, WidgetRef ref) {
    final theme = ref.watch(themePortProvider);

    return Scaffold(
      body: Container(
        margin: EdgeInsets.all(30),
        child: Center(
          child: Column(
            spacing: 20,
            children: [
              Spacer(flex: 8),
              Text(
                "Recuperar contraseña",
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),
              ),
              Spacer(flex: 1),
              Row(
                spacing: 10,
                children: [
                  Icon(
                    Icons.check,
                    color: theme.getColorFor(ThemeCode.buttonPrimary),
                  ),
                  Text(
                    "Correo enviado correctamente",
                    style: TextStyle(fontWeight: FontWeight.bold),
                  ),
                ],
              ),
              Spacer(flex: 1),
              Text(
                "Revisa tu email y haz clic en el enlace para crear una nueva contraseña",
              ),
              Text(
                "Si no recibes el correo en unos minutos, revisa tu carpeta de spam o pulsa \"Reenviar correo\"",
              ),
              Row(
                spacing: 10,
                children: [
                  Expanded(
                    child: OutlinedButton(
                      onPressed: () => {},
                      child: Text("Reenviar correo"),
                    ),
                  ),
                  Expanded(
                    child: FilledButton(
                      onPressed: () => {
                        // Navigator.push(
                        //   context,
                        //   MaterialPageRoute(
                        //     builder: (_) => NewPasswordScreen(),
                        //   ),
                        // ),
                      },
                      style: ButtonStyle(
                        backgroundColor: WidgetStatePropertyAll<Color>(
                          theme.getColorFor(ThemeCode.buttonSecondary),
                        ),
                      ),
                      child: Text("Continuar"),
                    ),
                  ),
                ],
              ),
              Spacer(flex: 10),
            ],
          ),
        ),
      ),
    );
  }
}
