<?php

/**
 * Dashboard Module Routes
 * 
 * This file is automatically loaded by ModuleLoader.
 * Define your dashboard routes here.
 * 
 * @var RouteCollection $routes
 */

// Health check endpoint
$routes->get('api/health', '\App\Modules\Dashboard\Controllers\HealthController::index');

// Dashboard API endpoints
$routes->group('api/dashboard', ['namespace' => 'App\Modules\Dashboard\Controllers'], function ($routes) {
    $routes->get('summary', 'DashboardController::summary');
    $routes->get('realtime', 'DashboardController::realtime');
    $routes->get('devices', 'DashboardController::devices');
    $routes->get('presence-settings', 'PresenceSettingsController::index');
    $routes->put('presence-settings', 'PresenceSettingsController::update');
    $routes->post('qr-attendance/generate', 'QrAttendanceController::generate');
    $routes->get('stream', 'RealtimeStreamController::index');
    $routes->get('schedules/today', 'DashboardScheduleController::today');
    $routes->get('schedules/by-date', 'DashboardScheduleController::byDate');
    $routes->get('schedules/current', 'DashboardScheduleController::current');
    $routes->get('attendance/progress/current', 'DashboardAttendanceController::progressCurrent');
});
