<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Providers;

use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;

/**
 * Class RouteServiceProvider
 *
 * @package Seka\Portal\Modul\Statistiky\Providers
 */
class RouteServiceProvider extends ServiceProvider
{
    /**
     *
     */
    public function boot(): void
    {
        $this->routes(function () {
            $this->mapApiRoutes();
            $this->mapWebRoutes();
        });
    }

    /**
     * Define the "web" routes for the application.
     *
     * These routes all receive session state, CSRF protection, etc.
     *
     * @return void
     */
    protected function mapWebRoutes(): void
    {
        $this->loadRoutesFrom(__DIR__ . '/../Routes/backend/web.php');
        $this->loadRoutesFrom(__DIR__ . '/../Routes/frontend/web.php');
    }

    /**
     * Define the "api" routes for the application.
     *
     * These routes are typically stateless.
     *
     * @return void
     */
    protected function mapApiRoutes(): void
    {
        $this->loadRoutesFrom(__DIR__ . '/../Routes/backend/api.php');
//        $this->loadRoutesFrom(__DIR__ . '/../Routes/frontend/api.php');
    }
}
