<?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 OwnerDigest extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(public array $stats, public string $hotelName)
    {
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: "Your daily digest — {$this->hotelName}",
        );
    }

    public function content(): Content
    {
        return new Content(view: 'emails.owner_digest');
    }
}
