import 'package:auth/src/recover_password/presentation/email_sent_screen.dart';
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:navigation/navigation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class RestorePasswordScreen extends ConsumerWidget {
  final NavigationContract navigationContract;

  const RestorePasswordScreen({super.key, required this.navigationContract});

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

    return Scaffold(
      body: Container(
        margin: EdgeInsets.all(30),
        child: Center(
          child: Column(
            spacing: 30,
            children: [
              Spacer(flex: 8),
              Text(
                "Recuperar contaseña",
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),
              ),
              Text(
                "Introduce tu email para enviarte un enlace de recuperación",
              ),
              TextField(
                decoration: InputDecoration(
                  labelText: "Correo electrónico",
                  hintText: "Correo electrónico",
                  border: OutlineInputBorder(),
                ),
              ),
              Row(
                spacing: 20,
                children: [
                  Expanded(
                    child: OutlinedButton(
                      onPressed: () => {Navigator.pop(context)},
                      child: Text("Volver"),
                    ),
                  ),
                  Expanded(
                    child: FilledButton(
                      onPressed: () => {
                        Navigator.push(
                          context,
                          MaterialPageRoute(
                            builder: (_) => EmailSentScreen(email: ""),
                          ),
                        ),
                      },
                      style: ButtonStyle(
                        backgroundColor: WidgetStatePropertyAll<Color>(
                          theme.getColorFor(ThemeCode.buttonSecondary),
                        ),
                      ),
                      child: Text("Enviar"),
                    ),
                  ),
                ],
              ),
              Spacer(flex: 10),
            ],
          ),
        ),
      ),
    );
  }
}
