<?php

namespace App\Filament\Resources\Agents\Schemas;

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

class AgentForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('agent_id')
                    ->label('Agent ID (এজেন্ট আইডি)')
                    ->required()
                    ->unique(ignoreRecord: true)
                    ->maxLength(255),

                Select::make('agent_type')
                    ->label('Agent Type (এজেন্টের ধরন)')
                    ->options([
                        'Master' => 'Master',
                        'Sub Admin' => 'Sub Admin',
                        'Super Admin' => 'Super Admin',
                    ])
                    ->required(),

                TextInput::make('phone_number')
                    ->label('Phone/WhatsApp Number')
                    ->tel()
                    ->required()
                    ->maxLength(255),

                // ফোন নাম্বারের ক্লিকেবল লিংকের ঘর
                TextInput::make('phone_link')
                    ->label('Phone Number Link')
                    ->url()
                    ->maxLength(255),

                TextInput::make('whatsapp_link')
                    ->label('WhatsApp Link')
                    ->url()
                    ->maxLength(255),

                TextInput::make('complaint_link')
                    ->label('Complaint Link')
                    ->url()
                    ->maxLength(255),
            ]);
    }
}