<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('main_title')->label(__('Main Title')),
                Field::make('description')->label(__('Description')),
                Field::make('background_color')->label(__('Background Color')),
                Field::make('icon')->label(__('Icon')),
                Field::make('images')->label(__('Images')),
                Field::make('secondary_title')->label(__('Secondary Title')),
                Field::make('event_tittle')->label(__('Event Title')),
                Field::make('max_event_count')->label(__('Max Event Count')),
                Field::make('join_title')->label(__('Join Title')),
                Field::make('button_text')->label(__('Button Text')),
                Field::make('button_color')->label(__('Button Color')),
                Field::make('button_background_color')->label(__('Button Background Color')),
                Field::make('individual_zone_id')->label(__('Individual Zone')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
