<?php

declare(strict_types=1);

namespace App\Filament\Resources\Payments\Schemas;

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

class PaymentForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema->components([
            Section::make('اطلاعات پرداخت')
                ->schema([
                    \App\Filament\Components\Form\UserSelect::create()->required()->columnSpan(6),
                    \App\Filament\Components\Form\ProjectSelect::create()->label('پروژه')->columnSpan(6),
                    \App\Filament\Components\Form\PriceTextInput::create()->required()->columnSpan(4),
                    \App\Filament\Components\Form\StatusSelect::create()->columnSpan(4),
                    \App\Filament\Components\Form\GatewayTextInput::create()->columnSpan(4),
                    \App\Filament\Components\Form\TransactionIdTextInput::create()->columnSpan(4),
                    \App\Filament\Components\Form\RefIdTextInput::create()->columnSpan(4),
                    \App\Filament\Components\Form\TokenTextInput::create()->columnSpan(4),
                    TextInput::make('card_number')->label('شماره کارت')->maxLength(50)->columnSpan(4),
                    TextInput::make('cellphone')->label('شماره همراه')->maxLength(20)->columnSpan(4),
                    TextInput::make('email')->label('ایمیل')->email()->maxLength(255)->columnSpan(4),
                    \App\Filament\Components\Form\RefUrlTextInput::create()->columnSpan(12),
                    \App\Filament\Components\Form\ModelTypeSelect::create()->required()->columnSpan(6),
                    TextInput::make('model_id')->label('شناسه مدل')->required()->maxLength(26)->columnSpan(6),
                    \App\Filament\Components\Form\CreatedBySelect::create()->required(),
                    \App\Filament\Components\Form\UpdatedBySelect::create(),
                ])
                ->columns(12)
                ->columnSpan(12),
        ])
            ->columns(12);
    }
}
