<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('firstName')->label(__('First Name')),
                Field::make('lastName')->label(__('Last Name')),
                Field::make('country')->label(__('Country')),
                Field::make('region')->label(__('Region')),
                Field::make('phone_number')->label(__('Phone Number')),
                Field::make('email')->label(__('Email')),
                Field::make('message')->label(__('Message')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
