<?php
use WooBooking\CMS\Utilities\Utility;
WpBookingPro_HtmlFrontend::_('jquery.slick');
$doc = Factory::getDocument();
$doc->addLessStyleSheet('blocks/block_listservice/assets/lesss/default.less');
$list_service=array_slice($list_service,0,3);
?>
<div class="block-list-service-default">
    <div class="row">
        <div class="col-md-12">
            <div class="wrapper-slide-service-item">
                <div class="row">
                    <?php foreach ($list_service as $item){ ?>
                        <?php
                        $item=(object)$item;
                        $list_service=array_slice((array)(!empty($item->list_service)?$item->list_service:array()),0,3);
                        ?>
                        <div class="col-md-4 col-sm-6">
                            <div class="wrapper-service-item">
                                <div class="img-block">
                                    <div class="wrapper-image" style="background:url('<?php esc_html_e(Factory::getRootUrlPlugin())?>/<?php esc_html_e($item->image) ?>')">
                                        
                                        <div class="list-cover">
                                            <ul>
                                                <?php for ($i=1;$i<5;$i++){ ?>
                                                    <li class="core-image"><img class="item-core-image" src="<?php esc_html_e(Factory::getRootUrlPlugin())?>/<?php esc_html_e($item->image) ?>" alt="item-core-image" /></li>
                                                <?php } ?>
                                            </ul>
                                        </div>
                                        <div class="price">$ <?php esc_html_e($item->price); ?></div>
                                    </div>
                                </div>
                                <div class="wrapper-content">
                                    <h3 class="title-service"><?php esc_html_e($item->name); ?></h3>
                                    <div class="description"><?php esc_html_e($item->description); ?></div>
                                    <div class="buttons">
                                        <a href="<?php esc_html_e(Factory::getRootUrl()) ?>wp-booking-pro/?page=service-detail&service_id=<?php echo $item->id;?>" class="btn btn-primary btn-view-more"><?php esc_html_e('View more'); ?></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
</div>

