<?php

namespace App\Filament\Loggers;

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

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

    public static function resource(ResourceLogger $logger): ResourceLogger
    {
        return $logger
            ->fields([
                Field::make('main_title')->label(__('Main Title')),
                Field::make('main_code')->label(__('Main Code')),
                Field::make('background_image')->label(__('Background Image')),
                Field::make('description')->label(__('Description')),
                Field::make('button_text')->label(__('Button Text')),
                Field::make('button_link')->label(__('Button Link')),
                Field::make('button_color')->label(__('Button Color')),
                Field::make('button_background_color')->label(__('Button Background Color')),
                Field::make('level_contain')->label(__('Level Contain')),
                Field::make('curriculum_title')->label(__('Curriculum Title')),
                Field::make('job_title')->label(__('Job Title')),
                Field::make('job_contain')->label(__('Job Contain')),
                Field::make('program_members')->label(__('Program Members')),
            ])
            ->relationManagers([
                //
            ]);
    }
}
