<?php

namespace App\Http\Controllers\App;

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

class ReportsController extends Controller
{
    public function __invoke(string $report): View
    {
        abort_unless(in_array($report, ['sources', 'agents', 'funnel', 'conversations', 'lost-reasons'], true), 404);

        return view('app.reports', [
            'report' => $report,
        ]);
    }
}
