<?php

namespace App\Filament\Resources\Bonuses\Schemas;

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

class BonusInfolist
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextEntry::make('employee.id')
                    ->label(__('hr.fields.employee')),
                TextEntry::make('bonus_date')
                    ->label(__('hr.fields.bonus_date'))
                    ->date(),
                TextEntry::make('bonus_type')
                    ->label(__('hr.fields.bonus_type'))
                    ->badge(),
                TextEntry::make('amount')
                    ->label(__('hr.fields.amount'))
                    ->numeric(),
                TextEntry::make('reason')
                    ->label(__('hr.fields.reason'))
                    ->placeholder('-')
                    ->columnSpanFull(),
                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 (Bonus $record): bool => $record->trashed()),
            ]);
    }
}
