<?php

namespace App\Filament\Resources\PenerimaanLimbahs\Schemas;

use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Select;
use Filament\Schemas\Schema;

class PenerimaanLimbahForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                DatePicker::make('tanggal')
                    ->required(),
                Select::make('limbah_id')
                    ->relationship('limbah', 'kode')
                    ->required(),
                TextInput::make('pic')
                    ->required(),
                Select::make('sumber')
                    ->options([
                        'Area Warehouse' => 'Area Warehouse',
                        'Area Repair TC' => 'Area Repair TC',
                        'Area Repair PH' => 'Area Repair PH',
                        'Area Repair CP' => 'Area Repair CP',
                        'Area Repair Genset' => 'Area Repair Genset',
                        'Area Repair BB & BC' => 'Area Repair BB & BC',
                        'Area Repair Container' => 'Area Repair Container',
                        'Area Repair Site Office & Panel' => 'Area Repair Site Office & Panel',
                        'Area Repair Bekisting' => 'Area Repair Bekisting',
                        'Area Repair Scafolding' => 'Area Repair Scafolding',
                    ])
                    ->required(),
                TextInput::make('jumlah')
                    ->minValue(0)
                    ->required()
                    ->numeric(),
                FileUpload::make('image')
                    ->image(),
            ]);
    }
}
