<?php

namespace App\Filament\Resources\ProjectStages\Schemas;

use Filament\Forms\Components\ColorPicker;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;

class ProjectStageForm
{
    public static function configure(Schema $schema): Schema
    {
        // Esta tabla sí tiene `id` uuid, así que no hay campo `key`.
        return $schema
            ->columns(2)
            ->components([
                TextInput::make('name')
                    ->label('Nombre visible')
                    ->required()
                    ->columnSpanFull(),
                ColorPicker::make('color')
                    ->label('Color')
                    ->required()
                    ->default('#6b7280'),
                TextInput::make('position')
                    ->label('Orden')
                    ->required()
                    ->numeric()
                    ->default(0),
                Toggle::make('is_active')
                    ->label('Activa')
                    ->default(true),
            ]);
    }
}
