<?php

namespace Devnet\EBC\Includes;

use Devnet\EBC\Admin\EditProduct;
use Devnet\EBC\Admin\AdminSide;
use Devnet\EBC\Public\PublicSide;


if (!defined('ABSPATH')) {
	exit;
}


class Plugin
{

	protected $plugin_name = DEVNET_EBC_NAME;
	protected $version     = DEVNET_EBC_VERSION;

	public function __construct()
	{
		$this->load_dependencies();
	}

	private function load_dependencies()
	{

		// require_once plugin_dir_path(dirname(__FILE__)) . 'includes/i18n.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'includes/defaults.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'includes/helper.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'admin/options.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'admin/settings-api.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'admin/settings.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'admin/edit-product.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'admin/admin.php';
		require_once plugin_dir_path(dirname(__FILE__)) . 'public/public.php';
	}


	public function run()
	{
		// new i18n();
		new EditProduct($this->plugin_name, $this->version);
		new AdminSide($this->plugin_name, $this->version);
		new PublicSide($this->plugin_name, $this->version);
	}
}
