<?php $_shouldextend[1]=1; ?>

<?php 
 $data = json_encode([
 'action' => 'account/orders',
 'count' => $count,
 'items' => $items,
 ], true);
 ?>

<?php $this->startSection('accountContent'); ?>
 <div x-data='<?php echo $data; ?>'>
 <div x-data="pagination">
 <div class="cabinet-page-orders">
 <template x-for="order in items">
 <div class="cabinet-page-orders__row">
 <table class="cabinet-page-orders__table">
 <template x-for="(item, itemIndex) in order.items">
 <tr>
 <td>
 <template x-if="itemIndex==0">
 <div class="cabinet-page-orders__date">
 <div>
 №<span x-text="order.id"></span>
 </div>
 <div x-text="order.dateShort"></div>
 <div x-text="order.statusTitle"></div>
 </div>
 </template>
 </td>

 <td>
 <img :src="item.img" alt="" class="cabinet-page-orders__img">
 </td>

 <td x-text="item.title"></td>

 <td>
 <template x-for="(option, optionKey) in item.options">
 <div x-text="option.title+':'+option.valueTitle"></div>
 </template>
 </td>

 <td>
 <span x-text="item.count"></span>
 <?php echo \htmlentities(__('cart.unit')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </td>

 <td>
 <span x-text="item.price"></span>
 <span x-text="order.currency"></span>
 </td>
 </tr>
 </template>
 </table>

 <div class="cabinet-page-orders__total">
 <?php echo \htmlentities(__('cart.total_sum')??'', ENT_QUOTES, 'UTF-8', false); ?>:
 <span x-text="order.sum"></span>
 <span x-text="order.currency"></span>
 </div>
 </div>
 </template>
 </div>

 <div class="cabinet-page-orders__button-outer">
 <button class="cabinet-page-orders__button" x-bind="button">
 <?php echo \htmlentities(__('site.show_more')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </button>
 </div>
 </div>
 </div>
<?php $this->stopSection(); ?>

<?php if (isset($_shouldextend[1])) { echo $this->runChild('account.layout'); } ?>