<?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')
                    ->date(),
                TextEntry::make('title'),
                TextEntry::make('description')
                    ->columnSpanFull(),
                TextEntry::make('severity')
                    ->badge(),
                TextEntry::make('attachment_path')
                    ->placeholder('-'),
                TextEntry::make('created_by')
                    ->numeric()
                    ->placeholder('-'),
                TextEntry::make('created_at')
                    ->dateTime()
                    ->placeholder('-'),
                TextEntry::make('updated_at')
                    ->dateTime()
                    ->placeholder('-'),
                TextEntry::make('deleted_at')
                    ->dateTime()
                    ->visible(fn (DisciplinaryReport $record): bool => $record->trashed()),
            ]);
    }
}
