<?php

namespace App\Filament\Resources\WatchedEvents\Schemas;

use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;

class WatchedEventForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema->components([
            TextInput::make('label')
                ->required()
                ->maxLength(128)
                ->helperText('Short geopolitical event label, e.g. "Iran tensions Apr–May 2026".'),
            DateTimePicker::make('starts_at')
                ->label('Starts at')
                ->required(),
            DateTimePicker::make('ends_at')
                ->label('Ends at')
                ->required()
                ->after('starts_at'),
            Textarea::make('notes')
                ->maxLength(2000)
                ->rows(4)
                ->columnSpanFull(),
        ]);
    }
}
