<?php

namespace App\Filament\Resources\Gifts\Schemas;

use App\Filament\Support\HrForm;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Schema;

class GiftForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                HrForm::employeeSelect(),
                DatePicker::make('gift_date')
                    ->label(__('hr.fields.gift_date'))
                    ->required()
                    ->default(now())
                    ->native(false),
                TextInput::make('gift_name')
                    ->label(__('hr.fields.gift_name'))
                    ->required()
                    ->maxLength(255),
                TextInput::make('value')
                    ->label(__('hr.fields.value'))
                    ->required()
                    ->numeric()
                    ->prefix('TMT')
                    ->minValue(0)
                    ->step(0.01)
                    ->default(0),
                Textarea::make('reason')
                    ->label(__('hr.fields.reason'))
                    ->rows(3)
                    ->columnSpanFull(),
            ]);
    }
}
