<?php

namespace App\Filament\Clusters\Settings\Provinces\Schemas;

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

class ProvinceForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Select::make('region')
                    ->label(__('Region'))
                    ->options(fn () => regions())
                    ->required()
                    ->native(false)
                    ->searchable(),

                TextInput::make('name')
                    ->label(__('Name'))
                    ->required()
                    ->maxLength(255)
                    ->translatableTabs(),

                Toggle::make('active')
                    ->label(__('Active'))
                    ->default(true)
                    ->required(),
            ]);
    }
}
