<?php

namespace App\Filament\Loggers;

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

    public static function getLabel(): string | Htmlable | null
    {
        return ZoneResource::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('description')->label(__('Description')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
