<?php
/**
 * File Path: includes/admin/tabs/imp-exp/class-mbs-tab-child-ui.php
 *
 * Import / Export Tab — UI Child
 *
 * Thin wrapper: prepares variables and delegates all HTML rendering to
 * templates/admin/imp-exp-ui.php via mbs_get_template_part().
 *
 * @package MyBookShowroom
 * @since   1.0.0
 */

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

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

	public function render(): void {
		$nonce         = wp_create_nonce( 'mbs_import_export' );
		$is_pro        = mbs_is_pro();
		$is_registered = mbs_is_registered();
		$template_url  = wp_nonce_url(
			admin_url( 'admin-ajax.php?action=mbs_download_csv_template' ),
			'mbs_download_csv_template'
		);

		mbs_get_template_part( 'admin/imp-exp-ui', array(
			'nonce'         => $nonce,
			'is_pro'        => $is_pro,
			'is_registered' => $is_registered,
			'template_url'  => $template_url,
		) );
	}
}
