<?php
/**
 * File Path: includes/blocks/class-mbs-block-search.php
 *
 * Book Search Block — Render
 *
 * PHP render_callback for the mbs/search Gutenberg block.
 * Registered by MBS_Blocks_Registry::register_search_block().
 *
 * Renders the live AJAX book search widget. Delegates to
 * MBS_Shortcode_Search::render(). FREE tier. No block attributes.
 *
 * @package    My_Book_Showroom
 * @subpackage Includes/Blocks
 * @since      1.0.0
 */

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

class MBS_Block_Search { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- mbs_/MBS_ prefix is correct; scanner not configured with plugin prefix

	public static function render( array $attributes ): string {
		if ( ! mbs_is_registered() ) {
			return '';
		}

		return MBS_Shortcode_Search::render( array() );
	}
}
