<?php
/**
 * Segment create page template
 *
 * @link       https://personalizewp.com/
 * @since      3.2.0 Merged into PWP
 * @since      1.0.0
 *
 * @package    PersonalizeWP
 * @subpackage PersonalizeWP/Admin
 */

namespace PersonalizeWP\Admin;

use PersonalizeWP\Admin\PageSegments;

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( PageSegments::$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 Segment', 'personalizewp' ); ?></h2>
		</header>

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

