<?php

namespace Daylight\Core\Modules\Admin\View\Composers;

use Daylight\Core\Modules\Admin\Registries\WidgetRegistry;
use Illuminate\View\View;

class WidgetViewComposer
{
    public function __construct(
        protected WidgetRegistry $widgets,
    ) {
        //
    }

    public function compose(View $view): void
    {
        $view->with('widgets', $this->widgets->all());
    }
}
