<?php
/**
 * Assets module wrapper.
 *
 * @package Kutby
 * @since   2.5.0
 */

declare(strict_types=1);

namespace Kutby\Modules;

use Kutby\Assets\AssetLoader;
use Kutby\Contracts\ModuleInterface;
use Kutby\Events\Dispatcher;

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

/**
 * Class AssetsModule
 */
final class AssetsModule implements ModuleInterface {

	/**
	 * {@inheritdoc}
	 */
	public function register(): void {
		( new AssetLoader() )->register();
		add_action( 'kutby_enqueue_assets', static function (): void {
			Dispatcher::emit( 'assets_loaded' );
		} );
	}

	/**
	 * {@inheritdoc}
	 */
	public function boot(): void {}
}
