<?php
/**
 * GDPR Settings Tab
 *
 * @package AmbassadorHub\Admin\Settings\Tabs
 */

namespace AmbassadorHub\Admin\Settings\Tabs;

use AmbassadorHub\Admin\Settings\AbstractTab;
use function __;
use function settings_fields;
use function do_settings_sections;
use function do_action;
use function submit_button;
/**
 * GDPR settings tab.
 */
final class GeneralTab extends AbstractTab {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->id       = 'general';
		$this->label    = __( 'GDPR Settings', 'ambassadorhub' );
		$this->priority = 30;
	}

	/**
	 * Render the GDPR Settings tab content.
	 *
	 * @return void
	 */
	public function render(): void {
		?>
		<form method="post" action="options.php"> 
			<?php settings_fields( 'ambh_general' ); ?>
			<?php do_settings_sections( 'ambh_general' ); ?>

			<?php
			/**
			 * Fires at the bottom of the General settings tab.
			 *
			 * Modules and feature plugins can add extra fields here.
			 *
			 * @since 0.1.0
			 */
			do_action( 'ambh_settings_general_fields' );
			?>

			<?php submit_button(); ?>
		</form>
		<?php
	}
}
