<?php
/**
 * Account Content Handler
 *
 * Hooks template content into the router.
 *
 * @package AmbassadorHub\Accounts\Blocks\Account
 */

namespace AmbassadorHub\Accounts\Blocks\Account;

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

use function add_action;

/**
 * Handles rendering content for account tabs.
 */
final class ContentHandler {
	/**
	 * Initialize content handlers.
	 *
	 * @return void
	 */
	public static function init(): void {
		add_action( 'ambh_account_content_dashboard', array( self::class, 'render_dashboard' ) );
		add_action( 'ambh_account_content_profile', array( self::class, 'render_profile' ) );
	}

	/**
	 * Render dashboard content.
	 *
	 * @return void
	 */
	public static function render_dashboard(): void {
		require __DIR__ . '/Templates/dashboard.php';
	}

	/**
	 * Render profile content.
	 *
	 * @return void
	 */
	public static function render_profile(): void {
		require __DIR__ . '/Templates/profile.php';
	}
}
