<?php

namespace App\Mail;

use App\Models\SiteSetting;
use App\Models\SupportTicket;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class SupportTicketConfirmationMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(
        public readonly SupportTicket $ticket
    ) {
    }

    public function build(): self
    {
        return $this
            ->subject('We received your ViZuTrade support ticket '.$this->ticket->ticketNumber())
            ->view('emails.support.ticket-confirmation', [
                'autoReplyMessage' => SiteSetting::supportAutoReplyMessage(),
            ]);
    }
}
