<?php
use WpBookingPro\Utilities\Utility as UtilityAlias;
$item = $this->item;
?>
<div class="col-md-6 block-category-item " data-id="<?php esc_html_e($item->id); ?>" data-ordering="<?php esc_html_e($item->ordering); ?>"
     href="#tab-category-<?php esc_html_e($item->id); ?>"
     aria-controls="tab-category-<?php esc_html_e($item->id); ?>"
>
    <div class="wrapper-category-item <?php echo($this->index_category == 0 ? ' active ' : '') ?> ">
        <div class="category-item-content">
            <p class="name"><?php esc_html_e($item->name); ?></p>
            <div class="number-service">
                <span class="label label-info"><?php printf('%s Services', count((array)$item->list_service)) ?></span>
            </div>
        </div>
        <div class="wrapper-button-category">
            <a href="<?php echo($this->permission?UtilityAlias::getBackendWooPanelGoToLink("category.form",array("id"=>$item->id)):'javascript:void(0)') ?>" class="btn-category-edit" title="<?php esc_attr_e('Edit','wpbookingpro')?>" <?php echo (esc_attr($this->permission?'':'disabled'))?>>
                <i class="icon-nb-edit"></i>
            </a>
            <a href="<?php echo($this->permission?UtilityAlias::goToTaskByViewWooPanel("category",'category.delete',array("id"=>$item->id)):'javascript:void(0)') ?>" class="btn-category-remove" title="<?php esc_attr_e('Delete','wpbookingpro')?>" <?php echo (esc_attr($this->permission?'':'disabled'))?>>
                <i class="icon-nb-delete"></i>
            </a>
        </div>
    </div>
</div>
