<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('background_image')->label(__('Background Image')),
                Field::make('short_description')->label(__('Short Description')),
                Field::make('main_title')->label(__('Main Title')),
                Field::make('about_description')->label(__('About Description')),
                Field::make('additional_sections')->label(__('Additional Sections')),
                Field::make('history_title')->label(__('History Title')),
                Field::make('history_description')->label(__('History Description')),
                Field::make('history_photos')->label(__('History Photos')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
