<?php

namespace App\Filament\Resources\EmployeeDocuments\Schemas;

use App\Models\EmployeeDocument;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Schema;

class EmployeeDocumentInfolist
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextEntry::make('employee.id')
                    ->label(__('hr.fields.employee')),
                TextEntry::make('document_type')
                    ->label(__('hr.fields.document_type'))
                    ->badge(),
                TextEntry::make('title')
                    ->label(__('hr.fields.title')),
                TextEntry::make('file_path')
                    ->label(__('hr.fields.file_path')),
                TextEntry::make('uploaded_at')
                    ->label(__('hr.fields.uploaded_at'))
                    ->dateTime(),
                TextEntry::make('created_at')
                    ->label(__('hr.fields.created_at'))
                    ->dateTime()
                    ->placeholder('-'),
                TextEntry::make('updated_at')
                    ->label(__('hr.fields.updated_at'))
                    ->dateTime()
                    ->placeholder('-'),
                TextEntry::make('deleted_at')
                    ->label(__('hr.fields.deleted_at'))
                    ->dateTime()
                    ->visible(fn (EmployeeDocument $record): bool => $record->trashed()),
            ]);
    }
}
