<?php

namespace App\Filament\Resources\Inquiries\Schemas;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\CheckboxList;
use Filament\Schemas\Schema;

class InquiryForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('type')
                    ->required(),
                TextInput::make('name')
                    ->required(),
                TextInput::make('email')
                    ->label('Email address')
                    ->email()
                    ->required(),
                TextInput::make('phone')
                    ->tel()
                    ->default(null),
                TextInput::make('organization')
                    ->default(null),
                TextInput::make('event_name')
                    ->label('Event / session name')
                    ->default(null),
                TextInput::make('event_date')
                    ->type('date')
                    ->default(null),
                TextInput::make('audience_profile')
                    ->default(null),
                TextInput::make('staff_size')
                    ->numeric()
                    ->default(null),
                TextInput::make('event_format')
                    ->default(null),
                TextInput::make('delivery_mode')
                    ->default(null),
                TextInput::make('venue')
                    ->default(null),
                TextInput::make('session_duration')
                    ->default(null),
                CheckboxList::make('topics')
                    ->columns(2)
                    ->options([
                        'Debt' => 'Debt',
                        'Saving' => 'Saving',
                        'Budgeting' => 'Budgeting',
                        'Investing' => 'Investing',
                        'Retirement planning' => 'Retirement planning',
                        'Financial confidence' => 'Financial confidence',
                        'Money and relationships' => 'Money and relationships',
                        'Other' => 'Other',
                    ])
                    ->columnSpanFull(),
                Textarea::make('message')
                    ->required()
                    ->columnSpanFull(),
                TextInput::make('status')
                    ->required()
                    ->default('new'),
            ]);
    }
}
