<?php

namespace Mtc\Modules\BlockRegistry\Providers;

use Illuminate\Support\ServiceProvider;
use Mtc\Modules\BlockRegistry\Services\BlockRegistryService;
use Mtc\Modules\BlockRegistry\Services\TemplateBlockService;
use Mtc\Modules\BlockRegistry\Services\EntityBlockService;
use Mtc\Modules\BlockRegistry\Services\ImageProcessingService;

class BlockRegistryServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     */
    public function register(): void
    {
        $this->app->singleton(BlockRegistryService::class);

        $this->app->singleton(TemplateBlockService::class);
        $this->app->singleton(EntityBlockService::class);
        $this->app->singleton(ImageProcessingService::class);
    }

    /**
     * Bootstrap services.
     */
    public function boot(): void
    {
        $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');

    }
}
