<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('member_name')->label(__('Member Name')),
                Field::make('member_img')->label(__('Member Img')),
                Field::make('member_position')->label(__('Member Position')),
                Field::make('member_job_title')->label(__('Member Job Title')),
                Field::make('member_desc')->label(__('Member Desc')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
