<?php

namespace App\Filament\Loggers;

use App\Models\Academic;
use App\Filament\Resources\AcademicResource;
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 AcademicLogger extends Logger
{
    public static ?string $model = Academic::class;

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('title')->label(__('Title')),
                Field::make('background_image')->label(__('Background Image')),
                Field::make('programs_count')->label(__('Programs Count')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
