{% set orders = __SELF__.orders %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
    <div class="container h-100">
        <div class="row h-100 align-items-center">
            <div class="col-12">
                <h5>{{ 'profileDropdown.Zakazlarym'|_ }}</h5>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{ 'index'|page }}">{{ 'breadcrumbEsasySahypa'|_ }}</a></li>
                    <li class="breadcrumb-item active">{{ 'profileDropdown.Zakazlarym'|_ }}</li>
                </ol>
            </div>
        </div>
    </div>
</div>
<!-- Breadcumb Area -->

<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
    <div class="container">
    
    {% if orders.count() == 0 %}
        <div class="container mb-5">
            <div class="row d-block justify-content-center align-items-center">
                <div class="col-6 d-block mx-auto">
                   <div class="text-center">
                      <img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
                  </div>
                </div>
                <div class="col-6 d-block mx-auto">
                   <div class="text-center">
                      <p>{{ 'profile.SuwagtlykcaZakazYok'|_ }}</p>
                  </div>
                </div>
              </div>
        </div>
    {% else %}
        <div class="row">
        {% partial "user/menu" %}
        
            <div class="col-12 col-lg-9">
                <div class="cart-table wishlist-table">
                    <div class="table-responsive">
                        <table class="table table-bordered mb-30">
                            <thead>
                                <tr>
                                    <th scope="col">{{ 'zakaz.TertipBelgisi'|_ }}</th>
                                    <th scope="col">{{ 'zakaz.Wagty'|_ }}</th>
                                    <th scope="col">{{ 'zakaz.Status'|_ }}</th>
                                    <th scope="col"></th>
                                </tr>
                            </thead>
                            <tbody>

                                {% for order in orders %}
                                    <tr>
                                        <td># {{ order.id }}</td>
                                        <td>{{ order.created_at.format('d.m.Y') }}</td>
                                        <td>
                                            {% if order.status == 'new' %}
                                                <span class="badge badge-info">{{ 'order.TazeSargyt'|_ }}</span>
                                            {% else %}
                                                <span class="badge badge-success">{{ 'order.KabulEdildi'|_ }}</span>
                                            {% endif %}
                                        </td>
                                        <td align="center" width="25%">
                                            <a href="{{ 'order-detail'|page({id: order.id}) }}" class="btn btn-primary btn-sm">{{ 'order.SargydyGormek'|_ }}</a>
                                        </td>
                                    </tr>
                                {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    {% endif %}
    </div>
</div>