<?php

namespace App\Mail;

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

class BookingSubmittedMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(
        public string $userName,
        public string $bookingReference,
        public string $roomName,
        public string $bookingDate,
        public string $startTime,
        public string $endTime,
        public string $purpose,
    ) {}

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'New booking request: ' . $this->bookingReference,
        );
    }

    public function content(): Content
    {
        return new Content(
            markdown: 'emails.booking-submitted',
        );
    }
}
