<?php

namespace App\Mail;

use App\Models\Denuncia;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class CredencialesDenuncianteMail extends Mailable
{
    use Queueable, SerializesModels;

    public User $user;
    public Denuncia $denuncia;
    public string $passwordTemporal;

    public function __construct(User $user, Denuncia $denuncia, string $passwordTemporal)
    {
        $this->user = $user;
        $this->denuncia = $denuncia;
        $this->passwordTemporal = $passwordTemporal;
    }

    public function build()
    {
        return $this->subject('Registro de denuncia - ' . $this->denuncia->codigo)
            ->view('emails.credenciales_denunciante');
    }
}