<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('main_title')->label(__('Main Title')),
                Field::make('image')->label(__('Image')),
                Field::make('text')->label(__('Text')),
                Field::make('director_title')->label(__('Director Title')),
                Field::make('director_name')->label(__('Director Name')),
                Field::make('director_desc')->label(__('Director Desc')),
                Field::make('director_position')->label(__('Director Position')),
                Field::make('director_college')->label(__('Director College')),
                Field::make('director_image')->label(__('Director Image')),
                Field::make('team_title')->label(__('Team Title')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
