<?php

declare(strict_types=1);

namespace Maestro\Core\Modules\HourRegistration\Providers;

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

class HourRegistrationModuleServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        if (config('core.modules.hours', true) !== true) {
            return;
        }

        $this->loadMigrationsFrom(dirname(__DIR__).'/database/migrations');

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