<tr>
    <th>
        <span>スーモ入稿用画像<br>（現地案内図）<br><span class="text-color-red mt10">※pngはSUUMOに入稿できません</span></span>
    </th>
    <td>
        @include('admin.objects.components.hidden', ['name' => 'del_traffic_map_id', 'value' => ''])
        <div id="sortable_article_image" class="p-regist__sorttable">
            <div id="image_list_portal" class="row">
                @php
                    $portal_traffic_map_content = '';
                    $file_paths = '';

                    if(!empty($suumo_traffic_map)){
                        $portal_traffic_map_content = $suumo_traffic_map->memo;
                        $file_paths = $suumo_traffic_map->file_path;
                    }
                @endphp
                @for($i=1; $i<=4; $i++)
                    @php
                        $portal_traffic_map_memo = '';
                        $file_path = '';

                        if(!empty($file_paths)){
                            foreach ($file_paths as $file){
                                if($file->id == $i){
                                    $file_path = $file->file_path;
                                    $portal_traffic_map_memo = $file->memo;
                                    break;
                                }
                            }
                        }
                    @endphp
                    @if($i == 3)
                        <div class="col-4 mt10 mb10">
                            <div class="bg-traffic-map">
                                <strong>交通アクセス図（車） <br/>路線図（電車・バス）</strong>
                                <p>※カーナビでルート設定できる場所があれば記載</p>
                                @include('admin.objects.components.textarea_house', ['name' => 'portal_traffic_map_content', 'class' => 'img_text mt10 position-relative', 'count' => 100, 'site' => 1, 'placeholder' => '100文字以内', 'value' => $portal_traffic_map_content])
                                <p class="float-left w-100 alart">注）物件住所でない場合は、モデルルームもしくは不動産会社等の住所であることが伝わるよう記載してください</p>
                            </div>
                        </div>
                    @endif
                    <div class="col-2 mt10 mb10">
                        <span class="bg-non-dark title_number mb10">
                            @if($i<3)
                                画像{{ $i }}
                            @endif
                            @if($i==3) 交通アクセス図 @endif
                            @if($i==4) 路線図 @endif
                        </span>
                        <label class="p-portalupload w-100 file_multiple_label" data-id="{{ $i }}" for="fileMutilInputTrafficMap{{ $i }}">
                            @if($file_path != '')
                                <img class="p-img-size" src="{{ str_replace('public', '/storage', $file_path).'?v='.strtotime(now()) }}">
                            @endif
                            <canvas width="0" height="0"></canvas>
                            <p class="p-imgupload__text">クリックまたは<br>ドラッグ&amp;ドロップ</p>
                            <input id="fileMutilInputTrafficMap{{ $i }}" type="file" accept="image/png, image/gif, image/jpeg" name="file_traffic_map[{{ $i }}]" class="file_multiple_input d-none">
                            <input type="hidden" name="file_path_suumo_traffic{{ $i }}" value="{{ $file_path }}">
                        </label>

                        @include('admin.objects.components.textarea_house', ['name' => 'portal_traffic_map_memo' . $i, 'class' => 'img_text mt10 position-relative', 'count' => 100, 'site' => 1, 'placeholder' => '画像コメント', 'value' => $portal_traffic_map_memo])

                        <div class="mt10 w-100 position-relative">
                            @include('admin.objects.components.hidden', ['name' => 'article_traffic_map_id' . $i, 'value' => $i])
                            @include('admin.objects.components.btn', ['name' => 'del_traffic_map_portal', 'class' => 'btn_imagedel w-100', 'title' => '削除', 'type' => 'button'])
                        </div>

                    </div>
                @endfor
            </div>
        </div>
    </td>
</tr>
