<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('alumni_name')->label(__('Alumni Name')),
                Field::make('alumni_photo')->label(__('Alumni Photo')),
                Field::make('company_name')->label(__('Company Name')),
                Field::make('alumni_position')->label(__('Alumni Position')),
                Field::make('alumni_description')->label(__('Alumni Description')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
