<?php

namespace App\Filament\Supplier\Resources\ProductStocks\Schemas;

use App\Enums\StockStatusEnum;
use Filament\Forms\Components\Select;
use Filament\Schemas\Schema;

class ProductStockForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema->components([
            Select::make('stock_status')
                ->label('Készlet státusz')
                ->options(
                    collect(StockStatusEnum::cases())
                        ->mapWithKeys(fn (StockStatusEnum $case) => [$case->value => $case->label()])
                )
                ->required(),
        ]);
    }
}
