<div class="popup" data-key="registration" x-data="modal" x-bind="modal">
 <div class="window">
 <a class="close" x-bind="close"></a>

 <form x-bind="form" class="form">
 <div class="name">
 <?php echo \htmlentities(__('account.registration')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </div>

 <p>
 <?php echo \htmlentities(__('account.already_have_account')??'', ENT_QUOTES, 'UTF-8', false); ?>


 <a href="#" @click="$store.modalStore.toggle('login')">
 <?php echo \htmlentities(__('account.to_login')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 </p>
 
 <div class="field">
 <label>
 <?php echo \htmlentities(__('account.fullname')??'', ENT_QUOTES, 'UTF-8', false); ?>

 <span class="form__start">*</span>
 </label>
 
 <input type="text" 
 name="fullname" 
 class="form__input"
 :class="errors.name ? 'error' : ''">

 <div x-text="errors.name" :class="errors.name ? 'form__error' : ''"></div>
 </div>
 
 <div class="field">
 <label>
 <?php echo \htmlentities(__('account.email')??'', ENT_QUOTES, 'UTF-8', false); ?>

 <span class="form__start">*</span>
 </label>

 <input type="text"
 name="email"
 class="form__input"
 :class="errors.email ? 'error' : ''">

 <div x-text="errors.email" :class="errors.email ? 'form__error' : ''"></div>
 </div>
 
 <?php echo $this->runChild('form.password', ['name' => 'password', 'require' => true]); ?>

 <div class="fb-link">
 <?php ($authUrl = getConfig('system')['authUrl']); ?>

 <a href="<?php echo \htmlentities(resUrl($authUrl, true)??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php echo \htmlentities(__('account.registration_facebook')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>
 </div>

 <div x-text="errors.message" :class="errors.message ? 'form__error' : ''"></div>

 <button type="submit" class="big">
 <?php echo \htmlentities(__('account.to_register')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </button>
 </form>
 </div>
</div>
