<?php

namespace App\Filament\Loggers;

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

class OfferPopUpLogger extends Logger
{
    public static ?string $model = OfferPopUp::class;

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('title')->label('Title'),
                Field::make('image')->label('Image'),
                Field::make('status')->label('Status'),
            ])
            ->relationManagers([
                // Add relation managers if needed
            ]);
    }
}