<?php

namespace Storeplugin\PDFInvoice;

defined('ABSPATH') || exit;

use Storeplugin\PDFInvoice\Framework\Contracts\ServiceInterface;
use Storeplugin\PDFInvoice\App\Contracts\WooHookableInterface;
use Storeplugin\PDFInvoice\Framework\Abstracts\Autowire;

/**
 * The file that defines the bootstraped class for Container.
 *
 * @since 1.0.0
 */
class Container extends Autowire
{
    /**
     * Register classes for container or wp hooks
     *
     * @return void
     */
    public function register(): void
    {
        $this->initRegisterClass(ServiceInterface::class, 'register');
        add_action('woocommerce_loaded', [$this, 'registerWCIntegration']);
    }

    public function registerWCIntegration(): void
    {
        $this->initRegisterClass(WooHookableInterface::class, 'init');
    }
}
