<?php
/**
 * Basic Forms - AI settings view.
 *
 * @package BasicForms
 */

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

use WP_PowerSuite\Admin\PageHero;

$list_url    = admin_url( 'admin.php?page=powersuite-basic-forms' );
$entries_url = admin_url( 'admin.php?page=powersuite-basic-forms&view=entries' );
$settings_url = admin_url( 'admin.php?page=powersuite-basic-forms&view=settings' );
?>
<div class="wrap wpps-bf-wrap wpps-bf-settings-page">
	<hr class="wp-header-end" style="margin:0;padding:0;border:none;height:0;overflow:hidden;">

	<?php
	PageHero::render_for_module(
		[
			'icon'    => 'dashicons-feedback',
			'title'   => __( 'AI Forms Settings', 'wp-powersuite' ),
			'tagline' => __( 'Configure AI provider and model used by the AI Form Builder.', 'wp-powersuite' ),
		]
	);
	?>

	<nav class="nav-tab-wrapper wp-clearfix" style="margin-bottom: 20px;">
		<a href="<?php echo esc_url( $list_url ); ?>" class="nav-tab"><?php esc_html_e( 'Forms', 'wp-powersuite' ); ?></a>
		<a href="<?php echo esc_url( $entries_url ); ?>" class="nav-tab"><?php esc_html_e( 'Entries', 'wp-powersuite' ); ?></a>
		<a href="<?php echo esc_url( $settings_url ); ?>" class="nav-tab nav-tab-active"><?php esc_html_e( 'Settings', 'wp-powersuite' ); ?></a>
	</nav>

	<?php include dirname( __DIR__ ) . '/admin.php'; ?>

	<p style="margin-top: 16px;">
		<button type="button" class="button button-primary wp-powersuite-custom-page-save" data-module-id="basic-forms">
			<?php esc_html_e( 'Save settings', 'wp-powersuite' ); ?>
		</button>
	</p>
</div>
