<?php

namespace App\Filament\Resources\Accounting\JournalMappings\Schemas;

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

class JournalMappingForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Select::make('transaction_type')
                    ->options([
            'sale' => 'Sale',
            'purchase' => 'Purchase',
            'sale_return' => 'Sale return',
            'purchase_return' => 'Purchase return',
            'payment_received' => 'Payment received',
            'payment_paid' => 'Payment paid',
            'cash_movement' => 'Cash movement',
        ])
                    ->required(),
                TextInput::make('field_name')
                    ->required(),
                Select::make('account_id')
                    ->relationship('account', 'name')
                    ->required(),
            ]);
    }
}
