<?php

namespace App\Mail;

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

class DemandaStatusMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(
        public Demanda $demanda,
        public string  $novoStatus,
        public string  $statusAnterior,
    ) {}

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: "Demanda atualizada: {$this->demanda->titulo}",
        );
    }

    public function content(): Content
    {
        return new Content(view: 'mail.demanda-status');
    }
}
