<?php

namespace App\Core\Services;

use App\Addons\Services\AddonLoader;

/**
 * Plugin Service
 * Handles plugin status checks, particularly for SaaS plugin
 */
class PluginService
{
    public function __construct(
        private AddonLoader $addonLoader
    ) {}

    /**
     * Check if SaaS plugin is active
     */
    public function isSaaSActive(): bool
    {
        return $this->addonLoader->isAddonEnabled('saas');
    }

    /**
     * Get plugin status
     */
    public function getPluginStatus(string $slug): bool
    {
        return $this->addonLoader->isAddonEnabled($slug);
    }
}
