<?php

namespace App\Mail;

use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class OrganizerRegistrationStaffNotificationMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(public User $applicant)
    {
        $this->applicant->loadMissing('organizer');
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: __('Nueva solicitud de organizador — :app', ['app' => config('app.name')]),
        );
    }

    public function content(): Content
    {
        return new Content(
            view: 'emails.organizer-registration-staff-notification',
        );
    }
}
