<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('logo')->label(__('Logo')),
                Field::make('url')->label(__('Url')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
