<?php

namespace App\Http\Controllers\ClaudeCode;

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

class CoworkController extends Controller
{
    public function index(Request $request): View|Response
    {
        if ($request->header('HX-Request')) {
            return response('', 200)->header('HX-Redirect', route('claude-code.cowork.index'));
        }

        return view('claude-code.cowork.index');
    }
}
