<?php

namespace App\Http\Controllers\Juil;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\View\View;

class PlanningController extends Controller
{
    public function estimate(Request $request): View|Response
    {
        if ($request->header('HX-Request')) {
            return response('', 200)->header('HX-Redirect', route('juil.estimate'));
        }

        return view('juil.estimate');
    }

    public function project(Request $request): View|Response
    {
        if ($request->header('HX-Request')) {
            return response('', 200)->header('HX-Redirect', route('juil.project'));
        }

        return view('juil.project');
    }
}
