<?php
namespace AIAutoTool\Features\InstallPlugin;

if ( ! defined( 'ABSPATH' ) ) exit; // Thoát nếu truy cập trực tiếp

/**
 * AI Auto Tool - Install Plugin Feature
 * 
 * @package AIAutoTool\Features\InstallPlugin
 * @namespace AIAutoTool\Features\InstallPlugin
 */



// Include the original Aiautotool_Install_Plugin
require_once dirname(__FILE__) . '/install-plugin-original.php';

// Create namespace wrapper
if (!class_exists('AIAutoTool\\Features\\InstallPlugin\\InstallPlugin')) {
    class InstallPlugin extends \Aiautotool_Install_Plugin {
        public $active_option_name = 'Aiautotool_Install_Plugin_active';
        public $icon = '<i class="fa-solid fa-download"></i>';
        
        public function __construct() {
            parent::__construct();
        }
        
        /**
         * Render feature for integrations page
         */
        public function render_feature() {
            $box = new \AutoToolBox(
                $this->icon . ' Install Plugin',
                'Install and manage plugins',
                admin_url('admin.php?page=aiautotool_integrations'),
                $this->active_option_name,
                $this->active,
                '',
                false
            );
            
            echo $box->generateHTML();
        }
    }
}
