<?php
/**
 * Plugin Name: Support Provisioning Portal
 * Description: Internal self-service portal for provisioning standardized Proxmox VE VMs and LXC containers.
 * Version: 0.7.0
 * Author: Internal Support
 * Requires PHP: 8.0
 * Requires at least: 6.2
 * Text Domain: support-provisioning-portal
 */

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

define('SPP_VERSION', '0.7.0');
define('SPP_PLUGIN_FILE', __FILE__);
define('SPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('SPP_PLUGIN_URL', plugin_dir_url(__FILE__));

require_once SPP_PLUGIN_DIR . 'includes/class-spp-permissions.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-activator.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-repository.php';
require_once SPP_PLUGIN_DIR . 'includes/interface-spp-proxmox-client.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-mock-proxmox-client.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-http-proxmox-client.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-expiration-service.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-rest-controller.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-admin-page.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-shortcode.php';
require_once SPP_PLUGIN_DIR . 'includes/class-spp-plugin.php';

register_activation_hook(__FILE__, ['SPP_Activator', 'activate']);
register_deactivation_hook(__FILE__, ['SPP_Activator', 'deactivate']);

add_action('plugins_loaded', static function (): void {
    SPP_Plugin::instance()->boot();
});
