<?php

// app/Notifications/NewMessageNotification.php

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class NewMessageNotification extends Notification implements ShouldQueue
{
    use Queueable;

    protected $message;
    protected $sender;

    public function __construct($message, $sender)
    {
        $this->message = $message;
        $this->sender = $sender;
    }

    public function via($notifiable)
    {
        return ['mail'];
    }

    // public function toMail($notifiable)
    // {
    //     return (new MailMessage)
    //         ->subject('New Message from ' . $this->sender->name)
    //         ->line('You have received a new message while you were offline:')
    //         ->line('"' . $this->message . '"')
    //         ->action('View Message', url('/'))
    //         ->line('Thank you for using our application!');
    // }
}
