<?php

namespace Plugins\Blog;

use Illuminate\Support\ServiceProvider;
use AleshaCMS\CMS\Hook\HookManager;

class BlogServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        $hooks = $this->app->make(HookManager::class);

        $hooks->filter('page_builder.sections', function (array $sections) {
            $sections[] = ['type' => 'blog-grid', 'label' => 'Blog Grid', 'icon' => 'document-text'];
            return $sections;
        });
    }
}
