<?php

namespace App\Providers;

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

class ThemeServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap services.
     */
    public function boot(): void
    {
        // Register component namespaces for each theme
        Blade::componentNamespace('App\\View\\Components\\Syndron', 'syndron');
        
        Blade::anonymousComponentNamespace(
            resource_path('views/components/syndron'),
            'syndron'
        );

        // Blade::componentNamespace('App\\View\\Components\\Theme2', 'theme-2');
        // Blade::componentNamespace('App\\View\\Components\\Theme3', 'theme-3');

        // Or if you have separate directories for each theme
        // $this->loadViewsFrom(resource_path('views/theme1'), 'theme-1');
        // $this->loadViewsFrom(resource_path('views/theme2'), 'theme-2');
        // $this->loadViewsFrom(resource_path('views/theme3'), 'theme-3');
    }
}
