<?php

namespace App\Notifications;

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

class FriendRequestNotification extends Notification
{
    use Queueable;

    public function __construct(public User $sender) {}

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

    public function toArray(object $notifiable): array
    {
        return [
            'title' => $this->sender->name . ' te envió una solicitud de amistad',
            'body'  => null,
            'url'   => route('friendships.index'),
            'icon'  => 'fa-user-plus',
            'color' => 'primary',
        ];
    }
}
