<?php

namespace App\Mail;

use App\Master\Models\ImpersonationRequest;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class ImpersonationRequestActionedMail extends Mailable
{
    use Queueable;
    use SerializesModels;

    public function __construct(public readonly ImpersonationRequest $impersonationRequest)
    {
    }

    public function build(): self
    {
        $status = $this->impersonationRequest->status;

        return $this
            ->subject('Impersonation Request ' . ucfirst($status))
            ->view('emails.impersonation-request-actioned', [
                'impersonationRequest' => $this->impersonationRequest,
                'status' => $status,
                'colours' => [
                    'app-text-colour' => '#000000',
                    'app-primary-colour' => '#3C576B',
                ],
            ]);
    }
}
