package com.example.cuida.ui.auth;

import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.example.cuida.databinding.ActivityForgotPasswordBinding;

public class ForgotPasswordActivity extends AppCompatActivity {

    private ActivityForgotPasswordBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityForgotPasswordBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        binding.resetButton.setOnClickListener(v -> {
            String email = binding.emailEditText.getText().toString();
            if (email.isEmpty()) {
                Toast.makeText(this, "Por favor insira o seu email.", Toast.LENGTH_SHORT).show();
            } else {
                // Mock reset logic
                Toast.makeText(this, "Email de recuperação enviado para " + email, Toast.LENGTH_LONG).show();
                finish();
            }
        });

        binding.backToLogin.setOnClickListener(v -> finish());
    }
}
