<?php

namespace App\Http\Controllers;

use App\Models\PartnerRegistrationRequest;
use Illuminate\Http\Request;

class PartnerRegistrationController extends Controller
{
    public function store(Request $request)
    {
        $validated = $request->validate([
            'name' => 'required|string|max:255',
            'phone' => 'required|string|max:20',
            'email' => 'nullable|email',
            'partner_type' => 'required|in:driver,restaurant,gas_office',
            'business_name' => 'nullable|string|max:255',
            'city' => 'nullable|string|max:100',
            'notes' => 'nullable|string|max:1000',
        ]);

        PartnerRegistrationRequest::create($validated);

        return back()->with('success', 'تم إرسال طلبك بنجاح! سنتواصل معك قريباً.');
    }
}
