<?php $__currentLoopData = $article_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <li class="p-results-image__li" id="mansion_<?php echo e($item->id); ?>">
        <div class="p-results-image__li-head d-flex justify-content-between">
            <div>
                <div class="d-flex">
                    <p class="p-results-image__li-name"><?php echo e($item->name); ?><!--（<?php echo e($item->main_traffic_station); ?>）--></p>
                </div>
            </div>
            <div class="p-results-image__li-btns d-flex justify-content-end list-unstyled">
                <a href="javascript:void(0);" class="c-circle-btn c-circle-btn__detail" data-id="<?php echo e($item->building_id); ?>"
                   id="bttnParentDetail<?php echo e($item->building_id); ?>">
                    <p>詳細</p>
                    <img src="../../business/img/icon_detail.png">
                </a>
            </div>
        </div>
        <div class="p-results-image__image-area d-flex">
            <div class="p-results-image__image d-flex">
                <?php if(!empty($item->top_file_path)): ?>
                    <div class="p-results-image__image-box"><img src="<?php echo e($item->top_file_path); ?>"/></div>
                <?php else: ?>
                    <div class="p-results-image__image-box"><img src="<?php echo e(root('img/noimage2.jpg')); ?>"/></div>
                <?php endif; ?>

                <?php if(!empty($item->floor_file_path)): ?>
                    <div class="p-results-image__image-box"><img src="<?php echo e($item->floor_file_path); ?>"/></div>
                <?php else: ?>
                    <div class="p-results-image__image-box"><img src="<?php echo e(root('img/noimage2.jpg')); ?>"/></div>
                <?php endif; ?>

            </div>
            <table class="p-results-image__main-info">
                <tr class="p-results-image__main-info-search">
                    <th>売出物件</th>
                    <td colspan="5">
                        <?php if($item->room_count): ?>
                            <a href="javascript:void(0);" class="disp_room"><?php echo e($item->room_count); ?><span>件</span><i
                                    class="fa fa-caret-down"></i></a>
                        <?php else: ?>
                            <span class="disp_room"><?php echo e($item->room_count); ?><span>件</span></span>
                        <?php endif; ?>
                    </td>
                </tr>
                <tr>
                    <th class="p-results-image__main-info-address">所在地</th>
                    <td colspan="5">
                        <?php echo e($item->address_info); ?>

                    </td>
                </tr>
                <tr class="p-results-image__main-info-access">
                    <th>交通</th>
                    <td colspan="5">
                        <?php echo $__env->make('business.objects.projects.traffic-info-summary', ['article' => $item], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    </td>
                </tr>
                <tr>
                    <th style="width:20%;">マンション番号</th>
                    <td style="width:10%;"><span class="id_target"><?php echo e($item->building_id); ?></span></td>
                    <th style="width:12%;">築年月</th>
                    <td style="width:20%;"><?php echo e($item->age_year?? "-"); ?>年<?php echo e($item->age_month?? "-"); ?>月</td>
                    <th style="width:12%;">階数</th>
                    <td>
                        <?php if($item->underground): ?>
                            地上<?php echo e($item->floor); ?>階 地下<?php echo e($item->underground); ?>階建
                        <?php elseif($item->floor): ?>
                            <?php echo e($item->floor); ?>階建
                        <?php else: ?>
                            -
                        <?php endif; ?>
                    </td>
                </tr>
                <tr>
                    <th style="width:12%;">総戸数</th>
                    <td style="width:15%;"><?php echo e($item->total_unit?? "-"); ?>戸</td>
                    <th>学校区</th>
                    <td colspan="3">
                        <?php if(isset($item->primary_school_name) || isset($item->secondary_school_name)): ?>
                            <?php echo e($item->primary_school_name?? "-"); ?>/<?php echo e($item->secondary_school_name?? "-"); ?>

                        <?php elseif(isset($item->other_primary_school_2) || isset($item->other_secondary_school_2)): ?>
                            <?php echo e($item->other_primary_school_2 ?? "-"); ?>/<?php echo e($item->other_secondary_school_2 ?? "-"); ?>

                        <?php else: ?>
                            -/-
                        <?php endif; ?>
                    </td>
                </tr>
            </table>
            <p class="p-results-image__info-photo align-self-end">
                <img src="../../business/img/icon_camera.png"
                     alt="写真">外<?php echo e($item->file_count); ?><!--/<?php echo e($item->rooms_file_count); ?>枚--></p>
        </div>
        <?php $__currentLoopData = $item->room_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div <?php if($item->show_ite == true): ?> class="p-mansion-room p-mansion-room-show" <?php else: ?> class="p-mansion-room"
                 <?php endif; ?> <?php if(isset($is_open) && $is_open == $room->building_id): ?> style="display: block" <?php endif; ?>>
                <input type="hidden" class="session-article-id" value="<?php echo e($room->building_id); ?>">
                <table class="p-mansion-room__tbl">
                    <tr>
                        <td class="p-mansion-room__tbl-number w90">物件番号<br/><span
                                class="room_building_id"><?php echo e($room->building_id); ?></span></td>
                        <th>部屋</th>
                        <td class="w190"><?php echo e($room->room_num?? '-'); ?></td>
                        <th>価格</th>
                        <td class="w160">
                            <?php echo e(number_format($room->price, 0, ",", ",")); ?>

                            <span>万円<?php if($room->tax==2): ?>
                                    （税込）
                                <?php endif; ?></span></td>
                        <th>専有</th>
                        <td class="w120"><?php echo e($room->total_area_val?? '-'); ?>m&sup2;</td>
                        <th>間取り</th>
                        <td class="w90"><?php echo e($room->floor_plan_text?? '-'); ?></td>
                        <th>階数</th>
                        <td class="w90"><?php if($room->maisonette == 1): ?>
                                <?php echo e($room->maisonette_from?? '-'); ?>階〜<?php echo e($room->maisonette_to?? '-'); ?>階
                            <?php else: ?>
                                <?php echo e($room->whereabouts?? '-'); ?>階
                            <?php endif; ?></td>
                        <td class="w90"><img src="/business/img/icon_camera.png" alt="写真">内<?php echo e($room->file_count); ?></td>
                        <td colspan="3">
                            <ul class="p-results-image__li-btns d-flex justify-content-end list-unstyled">
                                <?php if(!isset($print)): ?>
                                    <li>
                                        <?php echo $__env->make('business.objects.components.circle-btn-mansion',
                                            ['id' => 'btnCheck', 'class' => 'c-circle-btn__check-mansion', 'linkUrl' => '#',
                                            'img' => '../../business/img/icon_check.png', 'title' => '確認'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                    </li>
                                    <li>
                                        <?php echo $__env->make('business.objects.components.circle-btn-mansion',
                                            ['id' => 'btnDetail'.$room->building_id, 'mansion_id' => $item->id, 'class' => 'c-circle-btn__detail', 'linkUrl' => 'javascript:void(0);',
                                            'img' => '../../business/img/icon_detail.png', 'title' => '詳細'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                    </li>
                                <?php endif; ?>
                                <!--<li>
                                <?php echo $__env->make('business.objects.components.circle-btn-mansion',
                                    ['id' => 'btnDisplay', 'class' => 'c-circle-btn__disp-mansion', 'linkUrl' => '#',
                                    'img' => '../../business/img/icon_display.png', 'title' => '表示'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                </li>-->
                            </ul>
                        </td>
                    </tr>
                </table>
                
                <?php echo $__env->make('business.objects.projects.form-check-mansion', ['data_num' => $room->building_id, 'history_count' => count($room->history)], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('business.objects.projects.modal-history', ['history' => $room->history, 'data_num' => $room->building_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
