<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;

class LocationController extends Controller
{
    /**
     * Handle location selection request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function select(Request $request): JsonResponse
    {
        $locationId = $request->input('location_id');
        
        // Store location ID in session
        session(['location_id' => $locationId]);
        
        return response()->json(['success' => true]);
    }
}
