<?php

namespace App\Modules\HR\EmployeeSelfService\Controllers;

use App\Http\Controllers\Controller;
use App\Modules\HR\EmployeeSelfService\Services\EmployeeSelfDashboardService;
use Illuminate\View\View;

class MeDashboardController extends Controller
{
    public function __construct(
        private readonly EmployeeSelfDashboardService $dashboard,
    ) {}

    public function index(): View
    {
        $widgets = $this->dashboard->widgets(request()->user());

        return view('pages.me.dashboard', compact('widgets'));
    }
}
