<?php

use WooBooking\CMS\Utilities\Utility;

WpBookingPro_Html::_('jquery.icheck');
$doc = Factory::getDocument();
$doc->addScript('resources/js/twbs-pagination/jquery.twbsPagination.js');
$doc->addLessStyleSheet('admin/nb_apps/nb_woobooking/assets/less/view_list_wbcustomer.less');
ob_start();
$this->loadTemplate('list_item');
$item_customer_html = ob_get_clean();
?>
    <div class="view-list-customer">
    <div class="toolbar">
        <div class="toolbar1">
            <div class="row">
                <div class=" col-xl-3 col-md-3">
                    <h3><?php esc_attr_e('List customer','wpbookingpro') ?></h3>
                </div>
                <div class="col-xl-9 col-md-9">
                    <div class="pull-right">
                        <button class="btn btn-primary btn-add-new">
                            <i class="fas fa-plus-square"></i>
                            <span><?php esc_attr_e('Add new','wpbookingpro') ?></span>
                        </button>
                        <button class="btn btn-primary btn-delete">
                            <i class="fas fa-trash-alt"></i>
                            <span><?php esc_attr_e('Delete','wpbookingpro') ?></span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <div class="overflow-x-auto">
            <table class="table  tab-content table-striped table-hover list-wbcustomer main-table table-responsive">
                <thead>
                <tr>
                    <th class="nowrap"></th>
                    <th class="nowrap"><?php esc_attr_e('Customer','wpbookingpro') ?></th>
                    <th class="nowrap"><?php esc_attr_e('Wordpress user','wpbookingpro') ?></th>
                    <th class="nowrap"><?php esc_attr_e('Phone','wpbookingpro') ?></th>
                    <th ><?php esc_attr_e('Note','wpbookingpro') ?></th>
                    <th class="nowrap"><?php esc_attr_e('Birthday','wpbookingpro') ?></th>
                    <th class="nowrap"></th>
                </tr>
                </thead>
                <tbody class="list-wbcustomer main-table">
				<?php foreach ($this->list as $item) { ?>
					<?php $this->item = $item ?>
					<?php $this->loadTemplate('list_item') ?>
				<?php } ?>
                </tbody>
            </table>
        </div>
    </div>
<?php
$doc->addScriptApplySelector('.view-list-customer','view_list_wbcustomer',array(
    "item_customer_html"=>  $item_customer_html,
    "class_name_drawerel"=>  "drawerel-view-list-customer",
),'admin/nb_apps/nb_woobooking/assets/js/view_list_wbcustomer.js');