<?php

namespace App\Filament\Loggers;

use App\Models\UniPopUp;
use App\Filament\Resources\UniPopUpResource;
use Illuminate\Contracts\Support\Htmlable;
use Noxo\FilamentActivityLog\Loggers\Logger;
use Noxo\FilamentActivityLog\ResourceLogger\Field;
use Noxo\FilamentActivityLog\ResourceLogger\ResourceLogger;

class UniPopUpLogger extends Logger
{
    public static ?string $model = UniPopUp::class;

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('title')->label('Title'),
                Field::make('number_off')->label('Number Off'),
                Field::make('sign')->label('Sign'),
                Field::make('off')->label('Off'),
                Field::make('desc')->label('Description'),
                Field::make('status')->label('Status'),
                Field::make('url')->label('URL'),
            ])
            ->relationManagers([
                // Add relation managers if needed
            ]);
    }
}
