<div id="PortalModalDetail<?php echo e($num); ?>" style="display: none" class="modal-contents large">
    <?php if((($num == 1 || $num == 4) && $portal_status == 2) || (($num == 2 || $num == 5) && $portal_facility_status == 2) || ($num == 3 && $portal_facility_status == 2)): ?>
        <div id="modal_portal">
            <main id="modal_main">
                    <p class="font-size-14">セットできる画像がありません</p>
            </main>
            <footer id="modal_footer">
                <a href="javascript:;" class="portal__closebtn c-tab__backbtn modal-close">戻る</a>
                <a href="<?php echo e(route('showRegistImage', $article_id)); ?>" class="c-base-tab__save arrow-left">保存して画像登録ページへ</a>
            </footer>
        </div>
    <?php else: ?>
        <div id="modal_portal_detail">
        <?php if($portal == 'suumo'): ?>
            <?php if($num == 1): ?>
                <form class="portal-form-popup" method="POST" action="<?php echo e(route('portal.update.image', $article_id)); ?>"
                      enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

                    <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'article_id', 'value' => $article_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <input type="hidden" id="list_portal_image_do" name="list_portal_image_do" value="">
                    <input type="hidden" name="portal" value="suumo">
                    <main id="modal_main">
                        <div class="list scrollbar" id="scrollbar">
                            <div class="list__item">
                                <p class="text-blue mt-2">SUUMO<br>
                                    入稿用画像<br><strong class="text-red">最大20枚</strong></p>
                            </div>

                            <?php $__currentLoopData = $portal_suumo_image; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <img src="<?php echo e($photo->storageLink); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php if(isset($i) && $i < 20): ?>
                                <?php for($j = $i+1; $j < 20; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php else: ?>
                                <?php for($j = 0; $j < 20; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php endif; ?>
                            <div style="clear: both"></div>
                        </div>
                        <hr class="line-black">
                        <div class="list scrollbar" id="scrollbar">
                            <div class="list__item">
                                <p class="mt-4"><strong>候補画像</strong></p>
                            </div>
                            <?php $__currentLoopData = $suumo_image_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <span class="img-tick" data-num="<?php echo e($photo->id); ?>"></span>
                                    <?php if(isset($photo->first)): ?>
                                        <img class="h-100" src="<?php echo e($photo->file_path); ?>">
                                    <?php else: ?>
                                        <img class="h-100" src="<?php echo e($photo->storageLink); ?>">
                                    <?php endif; ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div style="clear: both"></div>
                    </main>
                    <footer id="modal_footer">
                        <button type="submit" class="c-base-tab__save">選択した候補画像をセット</button>
                        <a href="javascript:;" class="portal__closebtn modal-close">キャンセル</a>
                    </footer>
                </form>
            <?php else: ?>
                <form class="portal-form-popup" method="POST"
                      action="<?php echo e(route('portal.update.facility', $article_id)); ?>" enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

                    <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'article_id', 'value' => $article_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <input type="hidden" id="list_portal_facility_do" name="list_portal_facility_do" value="">
                    <input type="hidden" name="portal" value="suumo">
                    <main id="modal_main">
                        <div class="list" id="scrollbar">
                            <div class="list__item">
                                <p class="text-blue mt-2">SUUMO<br>
                                    入稿用画像<br><strong class="text-red">最大9枚</strong></p>
                            </div>
                            <?php $i = 0; ?>
                            <?php $__currentLoopData = $portal_suumo_facility; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <img src="<?php echo e($photo->storageLink); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php if($i < 10): ?>
                                <?php for($j = $i; $j < 9; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php endif; ?>
                            <div style="clear: both"></div>
                        </div>
                        <hr class="line-black">
                        <div class="list" id="scrollbar">
                            <div class="list__item">
                                <p class="mt-4"><strong>候補画像</strong></p>
                            </div>
                            <?php $__currentLoopData = $suumo_facility_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <span class="fac-tick" data-num="<?php echo e($photo->id); ?>"></span>
                                    <img src="<?php echo e($photo->file_path); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div style="clear: both"></div>
                    </main>
                    <footer id="modal_footer">
                        <button type="submit" class="c-base-tab__save">選択した候補画像をセット</button>
                        <a href="javascript:;" class="portal__closebtn modal-close">キャンセル</a>
                    </footer>
                </form>
            <?php endif; ?>
        <?php endif; ?>

        <?php if($portal == 'homes'): ?>
            <?php if($num == 3): ?>
                <form class="portal-form-popup" method="POST"
                          action="<?php echo e(route('portal.update.image', $article_id)); ?>"
                          enctype="multipart/form-data">
                        <?php echo e(csrf_field()); ?>

                        <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'article_id', 'value' => $article_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <input type="hidden" id="list_portal_image_do" name="list_portal_image_do" value="">
                        <input type="hidden" id="list_portal_facility_do" name="list_portal_facility_do" value="">
                        <input type="hidden" name="portal" value="homes">
                        <main id="modal_main">
                            <div class="list scrollbar" id="scrollbar">
                                <div class="list__item">
                                    <p class="text-yellow mt-2">Homes<br>
                                        入稿用画像<br><strong class="text-red">最大30枚</strong></p>
                                </div>

                                <?php $__currentLoopData = $portal_homes_image; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="list__item">
                                        <img src="<?php echo e($photo->storageLink); ?>" alt="">
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php if(isset($i) && $i < 20): ?>
                                    <?php for($j = $i+1; $j < 20; $j++): ?>
                                        <div class="list__item">
                                            <div class="squa"></div>
                                        </div>
                                    <?php endfor; ?>
                                <?php else: ?>
                                    <?php for($j = 0; $j < 20; $j++): ?>
                                        <div class="list__item">
                                            <div class="squa"></div>
                                        </div>
                                    <?php endfor; ?>
                                <?php endif; ?>
                                <div style="clear: both"></div>
                            </div>
                            <hr class="line-black">
                            <div class="list scrollbar" id="scrollbar">
                                <div class="list__item">
                                    <p class="mt-4"><strong>候補画像</strong></p>
                                </div>
                                <?php $__currentLoopData = $homes_image_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="list__item">
                                        <span class="img-tick" data-num="<?php echo e($photo->id); ?>"></span>
                                        <?php if(isset($photo->first)): ?>
                                            <img src="<?php echo e($photo->file_path); ?>">
                                        <?php else: ?>
                                            <img src="<?php echo e($photo->storageLink); ?>">
                                        <?php endif; ?>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                <?php $__currentLoopData = $homes_facility_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="list__item">
                                        <span class="fac-tick" data-num="<?php echo e($p->id); ?>"></span>
                                        <img src="<?php echo e($p->disp_file_path); ?>">
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                            <div style="clear: both"></div>
                        </main>
                        <footer id="modal_footer">
                            <button type="submit" class="c-base-tab__save">選択した候補画像をセット</button>
                            <a href="javascript:;" class="portal__closebtn modal-close">キャンセル</a>
                        </footer>
                    </form>
            <?php endif; ?>
        <?php endif; ?>
        <?php if($portal == 'athome'): ?>
            <?php if($num == 4): ?>
                <form class="portal-form-popup" method="POST" action="<?php echo e(route('portal.update.image', $article_id)); ?>"
                      enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

                    <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'article_id', 'value' => $article_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <input type="hidden" id="list_portal_image_do" name="list_portal_image_do" value="">
                    <input type="hidden" name="portal" value="athome">
                    <main id="modal_main">
                        <div class="list scrollbar" id="scrollbar">
                            <div class="list__item">
                                <p class="text-red1 mt-2">at home<br>
                                    入稿用画像<br><strong class="text-red">最大40枚</strong></p>
                            </div>

                            <?php $__currentLoopData = $portal_athome_image; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <img src="<?php echo e($photo->storageLink); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            <?php if(isset($i) && $i < 20): ?>
                                <?php for($j = $i+1; $j < 20; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php else: ?>
                                <?php for($j = 0; $j < 20; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php endif; ?>
                            <div style="clear: both"></div>
                        </div>
                        <hr class="line-black">
                        <div class="list scrollbar" id="scrollbar">
                            <div class="list__item">
                                <p class="mt-4"><strong>候補画像</strong></p>
                            </div>
                            <?php $__currentLoopData = $athome_image_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <span class="img-tick" data-num="<?php echo e($photo->id); ?>"></span>
                                    <?php if(isset($photo->first)): ?>
                                        <img src="<?php echo e($photo->file_path); ?>">
                                    <?php else: ?>
                                        <img src="<?php echo e($photo->storageLink); ?>">
                                    <?php endif; ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div style="clear: both"></div>
                    </main>
                    <footer id="modal_footer">
                        <button type="submit" class="c-base-tab__save">選択した候補画像をセット</button>
                        <a href="javascript:;" class="portal__closebtn modal-close">キャンセル</a>
                    </footer>
                </form>
            <?php else: ?>
                <form class="portal-form-popup" method="POST"
                      action="<?php echo e(route('portal.update.facility', $article_id)); ?>" enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

                    <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'article_id', 'value' => $article_id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <input type="hidden" id="list_portal_facility_do" name="list_portal_facility_do" value="">
                    <input type="hidden" name="portal" value="athome">
                    <main id="modal_main">
                        <div class="list" id="scrollbar">
                            <div class="list__item">
                                <p class="text-red1 mt-2">at home<br>
                                    入稿用画像<br><strong class="text-red">最大8枚</strong></p>
                            </div>
                            <?php $i = 0; ?>
                            <?php $__currentLoopData = $portal_athome_facility; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <img src="<?php echo e($photo->storageLink); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php if($i < 9): ?>
                                <?php for($j = $i; $j < 8; $j++): ?>
                                    <div class="list__item">
                                        <div class="squa"></div>
                                    </div>
                                <?php endfor; ?>
                            <?php endif; ?>
                            <div style="clear: both"></div>
                        </div>
                        <hr class="line-black">
                        <div class="list" id="scrollbar">
                            <div class="list__item">
                                <p class="mt-4"><strong>候補画像</strong></p>
                            </div>
                            <?php $__currentLoopData = $athome_facility_do; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="list__item">
                                    <span class="fac-tick" data-num="<?php echo e($photo->id); ?>"></span>
                                    <img src="<?php echo e($photo->file_path); ?>">
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div style="clear: both"></div>
                    </main>
                    <footer id="modal_footer">
                        <button type="submit" class="c-base-tab__save">選択した候補画像をセット</button>
                        <a href="javascript:;" class="portal__closebtn modal-close">キャンセル</a>
                    </footer>
                </form>
            <?php endif; ?>
        <?php endif; ?>

    </div>
    <?php endif; ?>
</div>
