<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('main_title')->label(__('Main Title')),
                Field::make('background_image')->label(__('Background Image')),
                Field::make('main_description')->label(__('Main Description')),
                Field::make('images')->label(__('Images')),
                Field::make('second_title')->label(__('Second Title')),
                Field::make('second_description')->label(__('Second Description')),
                Field::make('success_title')->label(__('Success Title')),
                Field::make('alumni_members_count')->label(__('Alumni Members Count')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
