<?php

namespace App\Mail;

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

class PasswordResetRequested extends Mailable implements ShouldQueue {
    use Queueable, SerializesModels;

    public User $recipient;
    public string $token;

    public function __construct(User $recipient, string $token) {
        $this->recipient = $recipient;
        $this->token = $token;
    }

    public function build(): PasswordResetRequested {
        return $this->subject('Запрос на сброс пароля')->view('mail.user.password-reset-requested');
    }
}
