<?php
/**
 * Scoring rule create page template
 *
 * @link       https://personalizewp.com/
 * @since      3.2.0 Merged into PWP
 * @since      1.1.0
 *
 * @package    PersonalizeWP
 * @subpackage PersonalizeWP/Admin
 *
 * @var PersonalizeWP\Model\Scoring_Rule $score_rule An instance of the Scoring Rule class.
 */

namespace PersonalizeWP\Admin;

use PersonalizeWP\Admin\PageScoringRules;

defined( 'ABSPATH' ) || exit; // Exit if accessed directly.

?>

	<main class="section entity-panel">
		<nav class="entity-panel__nav">
			<a href="<?php echo esc_url( admin_url( PageScoringRules::$index_url ) ); ?>" class="back">&larr; <?php esc_html_e( 'Back', 'personalizewp' ); ?></a>
		</nav>

		<header class="entity-panel__header">
			<h2 class="section-title"><?php esc_html_e( 'Create Scoring Rule', 'personalizewp' ); ?></h2>
		</header>

		<section class="pwp-panel">
			<div class="section-description">
				<p><?php esc_html_e( 'Create a new scoring rule using the options below. Once the scoring rules has been added, visitors will have the score value applied automatically when they match the conditions you have chosen.', 'personalizewp' ); ?></p>
			</div>
			<form id="pwp-form" data-pwp action="<?php echo esc_url( admin_url( PageScoringRules::$create_url ) ); ?>" method="post" accept-charset="UTF-8">
				<?php
					wp_nonce_field( 'create-scoring-rule' );
					require_once __DIR__ . '/_form.php';
				?>
			</form>
		</section>
	</main>

