<?php
$doc = Factory::getDocument();
WpBookingPro_Html::_('jquery.icheck');
$doc->addScript('resources/js/twbs-pagination/jquery.twbsPagination.js');
$doc->addLessStyleSheet('admin/nb_apps/nb_woobooking/assets/less/view_list_package.less');

use WooBooking\CMS\Utilities\Utility;

ob_start();
$this->loadTemplate('list_item');
$row_package_template = ob_get_clean();
?>
    <div class="view-list-package">
        <div class="toolbar">
            <div class="row">
                <div class="col-md-3"><h3><?php esc_attr_e('List Package','wpbookingpro') ?> </h3></div>
                <div class="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-package main-table table-responsive">
                <thead>
                <tr>
                    <th class="nowrap"><input type="checkbox" class="checked-all" /></th>
                    <th class="nowrap"><?php esc_attr_e('Name','wpbookingpro') ?> </th>
                    <th class="nowrap"><?php esc_attr_e('Name','wpbookingpro') ?> </th>
                    <th class="nowrap"></th>

                </tr>
                </thead>
                <tbody>
                <?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-package','view_list_package',array(
    "row_package_template"=>  $row_package_template
),'admin/nb_apps/nb_woobooking/assets/js/view_list_package.js');