<?php

namespace App\Mail;

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

class ModelRequestActionedMail extends Mailable
{
    use Queueable;
    use SerializesModels;

    public function __construct(public readonly ModelRequest $modelRequest)
    {
    }

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

        return $this
            ->subject('Vehicle Model Request ' . ucfirst($status) . ': ' . $this->modelRequest->model_name)
            ->view('emails.model-request-actioned', [
                'modelRequest' => $this->modelRequest,
                'status' => $status,
                'colours' => [
                    'app-text-colour' => '#000000',
                    'app-primary-colour' => '#3C576B',
                ],
            ]);
    }
}
