<?php
declare(strict_types=1);

/** @var \App\Core\Router $router */

use App\Middleware\AuthMiddleware;
use App\Middleware\TenantMiddleware;
use App\Core\Response;

$mw = [AuthMiddleware::class, TenantMiddleware::class];

// Global Search
$router->get('/search', 'SearchController@search', $mw);

// Notifications
$router->get('/notifications', 'NotificationController@index', $mw);
$router->put('/notifications/{id}/read', 'NotificationController@markRead', $mw);
$router->put('/notifications/read-all', 'NotificationController@readAll', $mw);

// Health Check
$router->get('/health', 'SearchController@health');

// States
$router->get('/states', 'StateController@index');
