<div class="verfacto-page-wrapper">
	<div class="verfacto-page-head">
		<div class="verfacto-head-content">
			<img style="width: 65px; height: 65px;" src="https://cdn.verfacto.com/wp-content/uploads/2022/01/31124111/verfacto-icon-65x65-1.svg" />
			<p class="verfacto-head-title">Verfacto Marketing Analytics for WooCommerce <br />
				<span>See the full picture of your marketing and get daily insights on how to improve it.</span>
			</p>
		</div>
	</div>
   <?php if ( array_key_exists( 'success', $_GET ) && trim( $_GET['success'] ) === '0' && ! $is_page_refreshed ) : ?>
   <div class="verfacto-error-message verfacto-error-danger">
	  <strong>Error</strong> - To install plugin, you need to approve access to your store.
   </div>
   <?php endif; ?>

   <?php if ( get_transient( 'verfacto_error_message' ) ) : ?>
   <div class="verfacto-error-message verfacto-error-danger">
	  <strong>Error</strong> - 
		<?php
		echo get_transient( 'verfacto_error_message' );
		delete_transient( 'verfacto_error_message' );
		?>
   </div>
   <?php endif; ?>

   <div class="verfacto-error-message verfacto-error-danger ajax" style="display: none;">
	  <strong>Error</strong> - <span class='verfacto-error-text'><span/>
   </div>
   <div class="verfacto-page-content">
		<div class="verfacto-page-title">
			<h4>Please log in to syncronize your data with Verfacto analytics</h4>
		</div>
		<div class="verfacto-form">
		<ul class="verfacto-tab-group" style="display: flex;">
			<li class="verfacto-tab active" style="flex: 1 1 auto;"><a href="#verfacto-login">Go back to login form</a></li>
			<?php if ( ! $plugin_active ) : ?>
				<li class="verfacto-tab" style="flex: 1 1 auto;"><a href="#verfacto-signup">Don’t have an account? Click here to sign up</a></li>
			<?php endif; ?>
		</ul>
		<div class="verfacto-tab-content">
			<div id="verfacto-login">
				<form id="verfacto-login-form" action="/" method="post">
					<div class="verfacto-field-wrap">
					<label>Email</label>
					<input type="email" name="user_email" required maxlength="125"/>
					</div>
					<div class="verfacto-field-wrap">
					<label>Password</label>
					<input type="password" name="user_password" required maxlength="125" autocomplete="off"/>
					</div>
					<a class="verfacto-forget-password" href="<?php echo esc_url( $forgot_password_url ); ?>" target="_blank">Forgot your password?</a>
				<button type="submit" class="verfacto-button"/>Log in</button>
				<div class="verfacto-loader"></div>
				</form>
			</div>
			<div id="verfacto-signup">
				<form id="verfacto-signup-form" action="/" method="post">
					<div class="verfacto-field-wrap">
					<label>Email</label>
					<input type="email"required name="user_email" maxlength="125" autocomplete="off"/>
					</div>
					<div class="verfacto-field-wrap">
					<label>Password</label>
					<input type="password"required name="user_password" maxlength="125" autocomplete="off"/>
					</div>
					<div class="verfacto-field-wrap">
					<label>Confirm Password</label>
					<input type="password"required name="user_password_confirm" maxlength="125" autocomplete="off"/>
					</div>
					<input type="hidden" name="auth_method" value="sign-up"/>
					<button type="submit" class="verfacto-button"/>Sign up</button>
					<div class="verfacto-loader"></div>
				</form>
			</div>
		</div>
		</div>
	</div>
	<div class="verfacto-page-footer">
	<div class="verfacto-page-title">
			<h4>Having troubles?</h4>
			<ul class="verfacto-troubles-list">
				<li><a href="https://www.youtube.com/watch?v=g0zwomwuRWg" target="blank">Watch an explanatory video</a></li>
				<li><a href="mailto:support@verfacto.com" target="blank">Contact support</a></li>
				<li><a href="https://calendly.com/verfacto/verfacto" target="blank">Book a demo</a></li>
			</ul>
		</div>
	</div>
</div>
