<?php

namespace App\Filament\Resources\ResellerPackages\Schemas;

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

class ResellerPackageForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Section::make('Package Details')
                    ->schema([
                        TextInput::make('name')
                            ->label('Package Name')
                            ->required()
                            ->placeholder('e.g. Annual Premium Plan'),

                        TextInput::make('price')
                            ->label('Package Price (৳)')
                            ->numeric()
                            ->required()
                            ->prefix('৳')
                            ->default(1000.00),

                        TextInput::make('validity_days')
                            ->label('Duration (Days)')
                            ->numeric()
                            ->required()
                            ->default(365)
                            ->suffix('Days'),

                        Toggle::make('is_active')
                            ->label('Active')
                            ->default(true),
                    ])
                    ->columns(2),
            ]);
    }
}
