<?php

namespace App\Filament\Resources\Votes\Schemas;

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

class VoteForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema->components([
            TextInput::make('title')->label('Judul')->required(),
            Textarea::make('description')->label('Deskripsi')->rows(3)->columnSpanFull(),
            Select::make('type')->options([
                'activity' => 'Kegiatan',
                'finance'  => 'Keuangan',
                'general'  => 'Umum',
            ])->required(),
            Select::make('status')
                ->options(['open' => 'Buka', 'closed' => 'Tutup'])
                ->default('open')
                ->required(),
            DateTimePicker::make('deadline')->label('Batas Waktu'),
        ]);
    }
}
