<?php

declare(strict_types=1);

namespace Builder\Core\Providers;

use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;

final class BladeServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Blade::directive('builderAssets', function (string $expression): string {
            $expression = $expression ?: "'builder'";

            return "<?php echo \\Builder\\Core\\Foundation\\Assets::tags({$expression}); ?>";
        });
    }
}
