<?php

namespace Dokan\TryAura\DependencyManagement\Providers;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

use Dokan\TryAura\DependencyManagement\BaseServiceProvider;
use Dokan\TryAura\Common\Assets;

/**
 * CommonServiceProvider Class
 *
 * @since 1.0.0
 */
class CommonServiceProvider extends BaseServiceProvider {

	/**
	 * The services provided by this provider.
	 *
	 * @since 1.0.0
	 *
	 * @var array
	 */
	protected $services = [
		'assets' => Assets::class,
	];

	/**
	 * Register the classes.
	 *
	 * @since 1.0.0
	 */
	public function register(): void {
		$filtered_services = apply_filters( 'tryaura_common_container_services', $this->services );
		foreach ( $filtered_services as $key => $class_name ) {
			$this->getContainer()->addShared( $key, $class_name );
		}
	}
}
