<?php

namespace Foxstudio\Plugins\Template\Controller;
use Foxstudio\Plugins\Template\Controller as Controller;
use Foxstudio\Plugins\Template\Utils as Utils;
use Foxstudio\Plugins\Template\Interface\PluginsControllerInterface;

class PluginsController implements PluginsControllerInterface
{

    private \WP_User $user;

    public function __construct()
    {              
        $this->user = \wp_get_current_user();

        \register_activation_hook(PLUGIN_URL, [$this, 'activationPlugins']);
        \register_deactivation_hook(PLUGIN_URL, [$this, 'disablePlugins']);
        \add_action('init', [$this, 'declarePlugins']);
        
    }

    public function activationPlugins(): void {
        // Perform activation tasks if needed
    }
    
    public function declarePlugins(): void {
        if(\is_plugin_active(BASE_NAME . "/pandaGadzety.php")) {
            
            new Utils\InformationAboutLabeling();
            new Utils\InformationAboutLabelingMixed();
            new Controller\CalculatorController();
            new Controller\ProductDetailsController();
            new Utils\LogisticMinimum(350, 45);
            new Utils\ShowMinimumPrice();
            

            // var_dump(wc()->session->get_session_cookie());
        }
    }
    
    public function disablePlugins(): void {
        // Perform activation tasks if needed
    }

    public function updatePlugins(): void {
        
    }

}