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

    public $dataAsupan;

    public function __construct($dataAsupan)
    {
        $this->dataAsupan = $dataAsupan;
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Konfirmasi Catatan Asupan - HiperDiet',
        );
    }

    public function content(): Content
    {
        // Kita akan membuat tampilan emailnya di file blade ini
        return new Content(
            view: 'emails.asupan-tersimpan',
        );
    }
}
