<?php

namespace App\Notifications;

use App\Models\Room;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class MeetingReminderNotification extends Notification
{
    use Queueable;

    public function __construct(
        public Room $room,
    ) {}

    public function via(object $notifiable): array
    {
        return ['database'];
    }

    public function toArray(object $notifiable): array
    {
        return [
            'type' => 'meeting_reminder',
            'title' => 'Meeting reminder',
            'body' => $this->room->title.' starts soon.',
            'url' => route('meet.rooms.show', $this->room),
            'room_uuid' => $this->room->uuid,
        ];
    }
}
