<?php

use WpBookingPro\Utilities\Utility;

$vendor = $this->vendor;
?>
<div class="block-vendor-item" >
    <div class="content-top">
        <div class="img-block">
            <div>
                <img src="<?php echo( esc_url(isset($vendor->image)?$vendor->image:''))?>" alt="vendor-image">
            </div>
        </div>
    </div>
    <div class="content-bottom">
        <h3><?php echo (esc_html(isset($vendor->first_name) || isset($vendor->last_name)?Utility::get_full_name($vendor->first_name, $vendor->last_name):''))?></h3>
        <div class="address infor-item">
            <i class="icon-nb-pin"></i>
            <span><?php echo (esc_html(isset($vendor->address)?$vendor->address:''))?></span>
        </div>
        <div class="email infor-item">
            <i class="icon-nb-email"></i>
            <span><?php echo (esc_html(isset($vendor->email)?$vendor->email:''))?></span>
        </div>
        <div class="number-products">
            <span><?php echo (esc_html(isset($vendor->list_service)?count($vendor->list_service):0))?></span>
            <span><?php esc_html_e('products','wpbookingpro');?></span>
        </div>
        <a href="<?php echo (esc_url($this->page_vendor_detail.'?user_id='.$vendor->id))?>" class="view-profile"><?php esc_html_e('View shop','wpbookingpro');?></a>
    </div>
</div>
