


<?php
    $items1 = [];
    if(isset($tmp_facilities)){
        foreach($tmp_facilities as $tmp_facility){
          if(isset($tmp_facility->parent->image)){
              $item3 = new stdClass();
              $item3->img = $tmp_facility->parent->image;
              $item3->number = $tmp_facility->parent->id;
              $item3->type = $tmp_facility->parent->typeName;
              $item3->name = $tmp_facility->parent->name;
              $item3->access ="徒歩{$tmp_facility->time}分（約{$tmp_facility->distance}m）";
              $item3->lat = $tmp_facility->parent->lat;
              $item3->lng = $tmp_facility->parent->lng;
              $item3->memo = $tmp_facility->parent->memo;
              array_push($items1, $item3);
          }
        }
    }
    $items2 = $items1;
?>

<div class="p-detail-summary">
    <h3 class="p-detail-summary__title"><?php echo e($item->article_name); ?><!--（<?php echo e($item->main_traffic_station); ?>

        駅）<?php echo e($item->property_name); ?>-->
        <?php if($item->price and $item->status!=4 and $item->status!=5): ?>
        <span
            class="p-detail-summary__price"><span><?php echo e(number_format($item->price, 0, ",", ",")); ?></span>万円<?php if($item->tax==2): ?><!--（税込）--><?php endif; ?></span>
        <?php endif; ?>
        <span class="p-detail-summary__id">No.<?php echo e($item->building_id); ?></span>
          </h3>
</div>
<div class="p-detail-map-around d-flex justify-content-between">
    <ul class="p-detail-map-around__left">
        <li class="p-detail-map-around__list-head">
            <p class="p-detail-map-around__list-head-photo">写真画像</p>
            <p class="p-detail-map-around__list-head-number">施設番号<br>施設種別</p>
            <p class="p-detail-map-around__list-head-name">施設名<br>徒歩分数/距離</p>
        </li>
        <?php $__currentLoopData = $items1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php if($i%2==0): ?>
            <li class="p-detail-map-around__list-row border-0">
                <div class="p-detail-map-around__list-row-photo">
                    <img src="<?php echo e($item->img); ?>">
                </div>
                <div class="p-detail-map-around__list-row-number">
                    <p><?php echo e($item->number); ?></p>
                    <p><?php echo e($item->type); ?></p>
                </div>
                <div class="p-detail-map-around__list-row-name">
                    <p><?php echo e($item->name); ?></p>
                    <?php if(request('action') == null): ?>
                        <?php
                            if($item->lat != ''){
                                $google = "https://maps.google.co.jp/maps/search/".$item->lat.",".$item->lng;
                            }else{
                                $google = "https://www.google.com/maps/embed/v1/place?q=".$item->pref_name.$item->city_name.$item->town_name.$item->address."&key=AIzaSyAvLqHslDD75YM0_3ZZYv_C9lYVKNLR_i0";
                            }
                        ?>
                        <p class="clearfix"><?php echo e($item->access); ?> <a class="float-right" target="_blank" href="<?php echo e($google); ?>">Googleマップ</a></p>
                    <?php endif; ?>
                </div>
            </li>
            <li class="p-detail-map-around__list-row justify-content-start bg-white" style="width: 100%; word-break: break-all;">
                <p class="p-detail-map-around__list-head-photo"></p>
                <p style="width: 83%"><?php echo e($item->memo); ?></p>
            </li>
            <?php endif; ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </ul>
    <ul class="p-detail-map-around__right">
        <li class="p-detail-map-around__list-head">
            <p class="p-detail-map-around__list-head-photo">写真画像</p>
            <p class="p-detail-map-around__list-head-number">施設番号<br>施設種別</p>
            <p class="p-detail-map-around__list-head-name">施設名<br>徒歩分数/距離</p>
        </li>
        <?php $__currentLoopData = $items1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php if($i%2!=0): ?>
            <li class="p-detail-map-around__list-row border-0">
                <div class="p-detail-map-around__list-row-photo">
                    <img style="width: 60px" src="<?php echo e($item->img); ?>">
                </div>
                <div class="p-detail-map-around__list-row-number">
                    <p><?php echo e($item->number); ?></p>
                    <p><?php echo e($item->type); ?></p>
                </div>
                <div class="p-detail-map-around__list-row-name">
                    <p><?php echo e($item->name); ?></p>
                    <p class="clearfix"><?php echo e($item->access); ?> <a class="float-right" target="_blank" href="https://www.google.com/maps?q=<?php echo e($item->lat); ?>,<?php echo e($item->lng); ?>">Googleマップ</a></p>
                </div>
            </li>
            <li class="p-detail-map-around__list-row justify-content-start bg-white" style="width: 100%; word-break: break-all;">
                <p class="p-detail-map-around__list-head-photo"></p>
                <p style="width: 83%"><?php echo e($item->memo); ?></p>
            </li>
            <?php endif; ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </ul>
</div>
