<?php

namespace App\Notifications;

use App\Models\PlayerRecord;

class RecordModerationResultNotification extends ArenaDatabaseNotification
{
    public function __construct(public PlayerRecord $record) {}

    public function toArray(object $notifiable): array
    {
        return $this->payload(
            'notifications.record_moderation.title',
            'notifications.record_moderation.message',
            [
                'title' => $this->record->title,
                'status' => $this->record->moderation_status->label(),
            ],
            url('/preview/profile/'.($this->record->playerProfile->user->username ?? '')),
            'bi-shield-check',
        );
    }
}
