<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('program_id')->label(__('Program Id')),
                Field::make('name')->label(__('Name')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
