<div class="subscribe">
 <p>
 <?php if($text): ?>
 <?php echo \htmlentities(__('site.' . $text)??'', ENT_QUOTES, 'UTF-8', false); ?>

 <?php else: ?>
 <?php echo \htmlentities(__('site.product_text_one_click')??'', ENT_QUOTES, 'UTF-8', false); ?>            
 <?php endif; ?>
 </p>

 <form x-data="callback" x-bind="form">
 <input type="hidden" name="action" value="oneclick">
 <input type="hidden" name="productId" value="<?php echo \htmlentities($res->id??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <input type="hidden" name="productTitle" value="<?php echo \htmlentities($res->pagetitle??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <input type="hidden" name="productColor" value="<?php echo \htmlentities($productColor['title']??'', ENT_QUOTES, 'UTF-8', false); ?>">

 <div class="subscribe-field">
 <input type="text" 
 class="form__input phone-mask" 
 name="phone" 
 x-model="data.phone"
 :class="errors.phone ? 'error' : ''">

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

 </button>
 </div>

 <div class="oneclick-messages">
 <div x-text="errors.message" :class="errors.message ? 'form__error' : ''"></div>
 <div x-text="errors.phone" :class="errors.phone ? 'form__error' : ''"></div>
 <div x-text="success" :class="success != '' ? 'form__success' : ''"></div>
 </div>
 </form>

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

 </p>
</div>
