<?php

declare(strict_types=1);

namespace Maestro\Core\Modules\HourRegistration\Providers;

use Illuminate\Support\ServiceProvider;
use Maestro\Core\Support\CorePaths;
use Maestro\Core\Support\ModuleRuntimeState;

class HourRegistrationModuleServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        if (ModuleRuntimeState::shouldLoadMigrations('hours')) {
            $this->loadMigrationsFrom(dirname(__DIR__).'/database/migrations');
        }

        $this->loadRoutesFrom(CorePaths::packageRoot().'/routes/modules/hours.php');
    }
}
