<?php

namespace App\Filament\Resources\DisciplinaryReports\Schemas;

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

class DisciplinaryReportInfolist
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextEntry::make('employee.id')
                    ->label(__('hr.fields.employee')),
                TextEntry::make('report_date')
                    ->label(__('hr.fields.report_date'))
                    ->date(),
                TextEntry::make('title')
                    ->label(__('hr.fields.title')),
                TextEntry::make('description')
                    ->label(__('hr.fields.description'))
                    ->columnSpanFull(),
                TextEntry::make('severity')
                    ->label(__('hr.fields.severity'))
                    ->badge(),
                TextEntry::make('attachment_path')
                    ->label(__('hr.fields.attachment'))
                    ->placeholder('-'),
                TextEntry::make('created_by')
                    ->label(__('hr.fields.created_by'))
                    ->numeric()
                    ->placeholder('-'),
                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 (DisciplinaryReport $record): bool => $record->trashed()),
            ]);
    }
}
