<?php

namespace App\Filament\Resources\Games\Schemas;

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

class GameForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('name')
                    ->required()
                    ->maxLength(255),
                TextInput::make('slug')
                    ->required()
                    ->maxLength(255),
                Select::make('platform_id')
                    ->relationship('platform', 'name')
                    ->required(),
                Select::make('genre_id')
                    ->relationship('genre', 'name')
                    ->required(),
            ]);
    }
}
