<?php

namespace App\Http\Controllers;

use App\Models\SopStep;
use App\Services\BookingSopService;
use Illuminate\Http\Request;

class BookingSopController extends Controller
{
    public function __construct(
        protected BookingSopService $sopService,
    ) {}

    public function index()
    {
        $orgHex = $this->getOrgHex();

        return view('pages.booking-sop', [
            'phases' => $this->sopService->getAllPhases($orgHex),
            'canEdit' => request()->user()?->can('update', SopStep::class),
        ]);
    }
}
