<?php

namespace App\Filament\Resources\Domains\Schemas;

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

class DomainForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('name')
                    ->required()
                    ->unique(ignoreRecord: true)
                    ->placeholder('e.g., imail.com'),
                \Filament\Forms\Components\Select::make('allowed_types')
                    ->multiple()
                    ->options([
                        'public' => 'Public',
                        'private' => 'Private',
                        'custom' => 'Custom',
                        'premium' => 'Premium',
                    ])
                    ->required(),
                Toggle::make('is_active')
                    ->default(true),
                Toggle::make('is_archived')
                    ->default(false),
            ]);
    }
}
