<?php

namespace App\Mail;

use App\Models\AssistanceApplication;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class AssistanceApplicationReceived extends Mailable implements ShouldQueue
{
    use Queueable;
    use SerializesModels;

    public function __construct(public AssistanceApplication $application) {}

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Assistance Application Received',
        );
    }

    public function content(): Content
    {
        return new Content(
            markdown: 'emails.assistance-application-received',
            with: [
                'application' => $this->application,
                'applicant' => $this->application->user,
            ],
        );
    }
}
