<?php

namespace CouponsPlus\App\Handlers;

use CouponsPlus\Original\Collections\Collection;
use CouponsPlus\Original\Environment\Env;
use CouponsPlus\Original\Events\Handler\EventHandler;

#[\AllowDynamicProperties]
class WelcomePageRegistrationHandler extends EventHandler
{
    protected $numberOfArguments = 1;
    protected $priority = 10;

    public function execute(): void
    {
        add_submenu_page(
            'woocommerce-marketing',
            'Coupons+',
            'Coupons+',
            'manage_woocommerce',
            Env::getWithPrefix('welcome'),
            [$this, 'renderPage']
        );
    }

    public function renderPage()
    {
        ?>
        <div id="root"></div>
        <?php
    }
}