<?php
$doc = Factory::getDocument();
$doc->addLessStyleSheet('nb_apps/nb_woobooking/assets/less/view_list_category.less');
?>
<div class="view-list-category">
    <h3><?php esc_attr_e('Categories','wpbookingpro') ?></h3>
    <div class="row">
		<?php foreach ($this->list as $item) { ?>
			<?php
			$list_service = $item->list_service;
			$a_list_service = array_slice($list_service, 0, 3);
			?>
            <div class="col-md-4">
                <div class="wrapper-category-item">
                    <h3><a href="<?php esc_html_e($this->goToLink("service.list",
							"category_id=" . $item->id)) ?>"><?php esc_html_e($item->name) ?></a></h3>
                    <p><?php esc_attr_e('Training','wpbookingpro') ?>:<?php echo count($list_service) ?></p>
                    <ul class="list-service">
						<?php foreach ($a_list_service as $service) { ?>
                            <li>
                                <img class="service-image" src="<?php echo Factory::getRootUrlPlugin() ?>/<?php esc_html_e($service->image) ?>" alt="service-image" />
                            </li>
						<?php } ?>
                    </ul>
                </div>
            </div>
		<?php } ?>
    </div>
</div>