<?php
/**
 * Settings page view
 *
 * @package WebEquipe\PDFSearch
 * @since 1.0.0
 */

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

$webequipe_pdf_dashboard_url = admin_url( 'admin.php?page=webequipe-pdf-search' );
$webequipe_pdf_help_url      = admin_url( 'admin.php?page=webequipe-pdf-search-help' );
?>
<div class="wrap webequipe-pdf-settings-wrap">
	<?php \WebEquipe\PDFSearch\Admin_Settings::render_pro_banner(); ?>

	<div class="webequipe-pdf-settings-header">
		<div class="webequipe-pdf-settings-header-text">
			<h1><?php esc_html_e( 'WebEquipe PDF Search Settings', 'webequipe-pdf-search' ); ?></h1>
			<p class="webequipe-pdf-settings-subtitle">
				<?php esc_html_e( 'Configure PDF indexing, search display, and processing controls from a grouped settings page.', 'webequipe-pdf-search' ); ?>
			</p>
		</div>
		<div class="webequipe-pdf-settings-header-actions">
			<a href="<?php echo esc_url( $webequipe_pdf_dashboard_url ); ?>" class="button button-secondary">
				<?php esc_html_e( 'View Dashboard', 'webequipe-pdf-search' ); ?>
			</a>
			<a href="<?php echo esc_url( $webequipe_pdf_help_url ); ?>" class="button button-secondary">
				<?php esc_html_e( 'Documentation', 'webequipe-pdf-search' ); ?>
			</a>
		</div>
	</div>

	<?php settings_errors(); ?>

	<form action="options.php" method="post" class="webequipe-pdf-settings-form">
		<?php
		settings_fields( 'webequipe_pdf_search_settings' );
		\WebEquipe\PDFSearch\Admin_Settings::render_settings_page_cards();
		?>
		<div class="webequipe-pdf-settings-footer">
			<?php submit_button( __( 'Save Changes', 'webequipe-pdf-search' ), 'primary', 'submit', false ); ?>
		</div>
	</form>
</div>
