<?php

namespace App\Filament\Loggers;

use App\Models\NewEventContain;
use App\Filament\Resources\NewEventContainResource;
use Illuminate\Contracts\Support\Htmlable;
use Noxo\FilamentActivityLog\Loggers\Logger;
use Noxo\FilamentActivityLog\ResourceLogger\Field;
use Noxo\FilamentActivityLog\ResourceLogger\RelationManager;
use Noxo\FilamentActivityLog\ResourceLogger\ResourceLogger;

class NewEventContainLogger extends Logger
{
    public static ?string $model = NewEventContain::class;

    public static function getLabel(): string | Htmlable | null
    {
        return NewEventContainResource::getModelLabel();
    }

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('new_event')->label(__('New Event')),
                Field::make('image')->label(__('Image')),
                Field::make('title')->label(__('Title')),
                Field::make('released_at')->label(__('Released At')),
                Field::make('description')->label(__('Description')),
                Field::make('author')->label(__('Author')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
