<?php

namespace App\Mail;

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

class AdminBookingStatusChanged extends Mailable
{
    use Queueable, SerializesModels;

    public $booking;
    public $oldStatus;
    public $adminName;

    public function __construct(Booking $booking, $oldStatus, $adminName = 'Admin')
    {
        $this->booking = $booking;
        $this->oldStatus = $oldStatus;
        $this->adminName = $adminName;
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Booking Status Updated - Hotel Bardan Boutique',
        );
    }

    public function content(): Content
    {
        return new Content(
            view: 'emails.admin-booking-status-changed',
        );
    }

    public function attachments(): array
    {
        return [];
    }
}

