<?php

namespace App\Modules\Admin\Controllers;

use Core\Controller\Controller;
use App\Modules\Admin\Services\AdminService;

class AdminController extends Controller
{
    private AdminService $service;

    public function __construct()
    {
        $this->service = new AdminService();
    }

    public function dashboard()
    {
        $stats = $this->service->getDashboardStats();
        $pendingDrivers = $this->service->getPendingDriverVerifications();
        $this->adminView('admin/dashboard', [
            'stats' => $stats,
            'pendingDrivers' => $pendingDrivers
        ]);
    }

    public function users()
    {
        $users = $this->service->getUsers();

        $this->adminView('admin/users', [
            'users' => $users
        ]);
    }

// UserPresenter.php ili helper



    public function rides()
    {
        $rides = $this->service->getRides();

        $this->adminView('admin/rides', [
            'rides' => $rides
        ]);
    }

}