<?php

/*
 * Plugin Name:       Panda gadżety
 * Description:       Handle the basics with this plugin.
 * Version:           1.0.0
 * Requires at least: 5.2
 * Requires PHP:      7.2
 * Author:            Foxstudio
 * Author URI:        https://foxstudio.info/
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Update URI:        https://example.com/my-plugin/
 * Text Domain:       Wtyczka dodająca wsparcie produktów
 * Domain Path:       /languages
 */

namespace Foxstudio\Plugins\Template;

define("PLUGIN_URL", __FILE__);
define("PLUGIN_URL_DIR", untrailingslashit(dirname(PLUGIN_URL)));
define("BASE_NAME", dirname(plugin_basename(__FILE__)));
define("API_KEY", "a8b83f8432b6d0eb4dc9432b4eefc3989d759bd9ac20");
// define("SERVER_URL", "http://webpage");
define("SERVER_URL", "http://51.68.141.253:2001");

// Wordpress
require_once ABSPATH . 'wp-includes/pluggable.php';

// Repository
require_once __DIR__ . "/repository/get_product_info.php";


// Interface
require_once __DIR__ . "/interface/plugins-controller-interface.php";

// utils
require_once __DIR__ . "/utils/load-file.php";
require_once __DIR__ . "/utils/delivery-tab.php";
require_once __DIR__ . "/utils/labeling-tab.php";
require_once __DIR__ . "/utils/labeling-description-tab.php";
require_once __DIR__ . "/utils/product-description-tab.php";
require_once __DIR__ . "/utils/product-calculator.php";
require_once __DIR__ . "/utils/logistic-minimum.php";
require_once __DIR__ . "/utils/modify-product-name.php";
require_once __DIR__ . "/utils/information-about-realization.php";
require_once __DIR__ . "/utils/information-about-labeling-mixed.php";
require_once __DIR__ . "/utils/notice.php";


// Controller
require_once __DIR__ . "/controller/plugins-controller.php";
require_once __DIR__ . "/controller/panda-calculator-controller.php";
require_once __DIR__ . "/controller/panda-product-details-loader.php";

// Init plugins
function initPlugin()
{
    new Controller\PluginsController();
}

\add_action('plugins_loaded', 'Foxstudio\Plugins\Template\initPlugin');