<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('title')->label(__('Title')),
                Field::make('text')->label(__('Text')),
                Field::make('location')->label(__('Location')),
                Field::make('longitude')->label(__('Longitude')),
                Field::make('latitude')->label(__('Latitude')),
                Field::make('button_label')->label(__('Button Label')),
                Field::make('button_color')->label(__('Button Color')),
                Field::make('button_background_color')->label(__('Button Background Color')),
                Field::make('faq_title')->label(__('Faq Title')),
                Field::make('faq_items')->label(__('Faq Items')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
