<style>
    .p-detail-main-sheet__left-imagesbox{
        overflow: inherit;
    }
</style>
<div class="p-detail-main-sheet__left">
    <div class="p-detail-main-sheet__left-icon-print2"></div>
    @if(!in_array($item->property, [6, 7]))
        @if($item->sheet_file_type == 2 || $item->sheet_file_type == null)
            <div class="p-detail-main-sheet__left-box">
                <div class="p-detail-main-sheet__left-imagesbox preview-image-board-container--image-board">
                    <ul class="p-detail-main-sheet__left-photos list-unstyled preview-detail-other-img">
                        @php
                            $photosOutdoorPrint = isset($photosOutdoor) ? $photosOutdoor : $item->photosOutdoor;
                            $photosPrint = isset($photos) ? $photos : $item->photos;
                        @endphp
                        @if(!empty($photosOutdoorPrint[0]->disp_file_path))
                            <li class="p-detail-main-sheet__left-photo">
                                <div class="p-detail-main-sheet__left-border"><img src="{{$photosOutdoorPrint[0]->disp_file_path}}" /></div>
                            </li>
                            <?php $photoOut_cnt=1;?>
                            @for($photo_cnt=0;$photo_cnt<4;$photo_cnt++)
                                <li class="p-detail-main-sheet__left-photo">
                                    @if(!empty($photosPrint[$photo_cnt]->disp_file_path))
                                        <div class="p-detail-main-sheet__left-border"><img src="{{$photosPrint[$photo_cnt]->disp_file_path}}" /></div>
                                    @elseif(!empty($photosOutdoorPrint[$photoOut_cnt]->disp_file_path))
                                        <div class="p-detail-main-sheet__left-border"><img src="{{$photosOutdoorPrint[$photoOut_cnt]->disp_file_path}}" /></div>
                                        <?php $photoOut_cnt++;?>
                                    @else
{{--                                        <div class="p-detail-main-sheet__left-noimage"><span>No Image</span></div>--}}
                                    @endif
                                </li>
                            @endfor
                        @else
                            @for($photo_cnt=0;$photo_cnt<5;$photo_cnt++)
                                <li class="p-detail-main-sheet__left-photo image-preview-child">
                                    @if(!empty($photosPrint[$photo_cnt]->disp_file_path))
                                        <div class="p-detail-main-sheet__left-border"><img src="{{$photosPrint[$photo_cnt]->disp_file_path}}" /></div>
                                    @else
{{--                                        <div class="p-detail-main-sheet__left-noimage"><span>No Image</span></div>--}}
                                    @endif
                                </li>
                            @endfor
                        @endif
                        <div class="clear"></div>
                    </ul>
                    <div>
                        <ul class="p-detail-main-sheet__left-images list-unstyled">
                            <li class="p-detail-main-sheet__left-image main-img">
                                @if($item->vertical === 1)
                                    @if(!empty($item->file_path2))
                                        <div class="p-detail-main-sheet__left-border p-detail-main-sheet__file-vertical">
                                            <img src="{{url(str_replace('/floor/', '/floor/800/', $item->file_path2))}}"/>
                                        </div>
                                    @else
{{--                                        <div class="p-detail-main-sheet__left-noimage p-detail-main-sheet__file-vertical"><span>No Image</span></div>--}}
                                    @endif
                                @else
                                    @if(!empty($item->disp_file))
                                        <div class="p-detail-main-sheet__left-border p-detail-main-sheet__file-horizontal first-img-horizontal">
                                            <img class="img-1200" src="{{url(str_replace('/floor/', '/floor/1200/', $item->disp_file))}}"/>
                                            <img class="img-800" src="{{url(str_replace('/floor/', '/floor/800/', $item->disp_file))}}"/>
                                        </div>
                                    @else
{{--                                        <div class="p-detail-main-sheet__left-noimage p-detail-main-sheet__file-horizontal first-img-horizontal"><span>No Image</span></div>--}}
                                    @endif
                                @endif
                            </li>
                        </ul>
                        <div class="clear"></div>
                        <div class="recommend-txt">
                            <div class="p-detail-main-sheet__left-point">{!!strlen($item->point_recommend) > 20 ? mb_substr($item->point_recommend, 0, 20,"UTF-8") : $item->point_recommend!!}</div>
                            <div class="p-detail-main-sheet__left-point">{!!strlen($item->point_recommend2) > 20 ? mb_substr($item->point_recommend2, 0, 20,"UTF-8") : $item->point_recommend2!!}</div>
                            <div class="p-detail-main-sheet__left-point">{!!strlen($item->point_recommend3) > 20 ? mb_substr($item->point_recommend3, 0, 20,"UTF-8") : $item->point_recommend3!!}</div>
                            <div class="p-detail-main-sheet__left-point">{!!strlen($item->point_recommend4) > 20 ? mb_substr($item->point_recommend4, 0, 20,"UTF-8") : $item->point_recommend4!!}</div>
                            {{--<div class="p-detail-main-sheet__left-point">{!!strlen($item->memo_business) > 30 ? mb_substr($item->memo_business, 0, 30,"UTF-8") : $item->memo_business!!}</div>--}}
                        </div>
                    </div>

                </div>
                <div class="clear"></div>
                <div class="memo-business">{{ $item->getMemobusiness2() }}</div>
            </div>

        @else
            <div class="left-content">
                <ul class="list-unstyled">
                    <li class="p-print-single__left-image">
                        @if(!empty($item->disp_file))
                            <img src="{{$item->disp_file}}"/>
                        @else
                            <img src="{{root('img/noimage2.jpg')}}"/>
                        @endif
                    </li>
                </ul>
                <div class="other-memo-description">
                    <span class="p-detail-main-sheet__left-right">{!! nl2br(e($item->memo_business)) !!}</span>
                    <span class="p-detail-main-sheet__left-right @if($item->property == 4 || $item->property == 5) p-detail-main-sheet__left-right-house @endif">
                @if($item->classfication == 2 or $item->classfication == 3)
                            ■
                            @if($item->classfication != 1)
                                @if($item->property == 4 || $item->property == 5)
                                    売買区分：{{$item->trading_classfication == 1 ? '一棟売　' : '一括売　'}}
                                @elseif(empty($item->property))
                                    売買区分：{{$item->trading_classfication == 1 ? '一室売　' : '一括売　'}}
                                @endif
                                @if($item->classfication == 2)
                                    事業用用途：{{!empty($item->use_method) && $item->classfication == 2 ? $item->getUserMethod() : '-'}}
                                    事業用引渡し状態：
                                    @php
                                        $names = ['-', '造作譲渡あり', '造作譲渡なし', '設備無償譲渡', 'スケルトン渡し'];
                                        echo $names[$item->business_status] ?? '';
                                    @endphp
                                @elseif($item->classfication == 3)
                                    {{ str_replace('<br>','　',$item->getInvestmentPerformance()) }}

                                @endif
                            @endif



                        @endif
                        @if($item->land_right == 2 or $item->land_right == 3)
                            @switch($item->land_right)
                                @case(0)
                                @break
                                @case(1)
                                @break
                                @case(2)
                                @case(3)
                                <br>
                                <span>
                          ■借地権種別：{{ getLeaseholdKind($item->leasehold_kind) }}
                      </span>
                                <br>
                                <span>
                          地代：
                          @if ($item->land_rent == 1)
                                        {{ $item->land_rent_val }}円/
                                        @php
                                            $landUnits = ["", "月", "年", "一括"];
                                        @endphp
                                        {{ $landUnits[$item->land_rent_unit] ?? "" }}
                                    @else
                                        無
                                    @endif
                      </span>
                                <br>
                                <span>
                          借地期間：{{ $item->leasehold_period == 1 ? "残存" : "新規" }} ({{ $item->leasehold_period_year }}年{{ $item->leasehold_period_month }}ヶ月)
                      </span>
                                <br>
                                <span>
                          権利金：
                          @if ($item->right_cost == 0)
                                        無
                                    @else
                                        有(価格に含む) ({{ $item->right_cost_val }}万円)
                                    @endif
                      </span>
                                <br>
                                <span>
                          保証金：
                          @if ($item->deposit_cost == 0)
                                        無
                                    @else
                                        有 ({{ $item->deposit_cost_val }}万円)
                                    @endif
                      </span>
                                <br>
                                <span>
                          敷金：
                          @if ($item->security_deposit_cost == 0)
                                        無
                                    @else
                                        有 ({{ $item->security_deposit_cost_val }}万円)
                                    @endif
                      </span>
                                <br>
                                <span>
                          借地権その他契約事項：{{ $item->other_leasehold }}
                      </span>
                                <br>
                                @if ($item->land_right == 3)
                                    <span>
                              借地権割合：{{ $item->leasehold_rate }}%
                          </span>
                                    <br>
                                @endif
                                @php
                                    $isMore = [3, 4, 7, 8];
                                @endphp
                                @if (in_array($item->leasehold_kind, $isMore))
                                    <span>
                              @php
                                  $registrationsText = ["未選択", "可", "不可", "相談"];
                              @endphp
                              定期借地権設定登記：{{ $registrationsText[$item->regular_leased_registration] ?? "" }}
                          </span>
                                    <br>
                                    <span>
                              @php
                                  $seasonsText = ["未選択", "一定期間毎", "事前協議により決定"];
                              @endphp
                              定期借地権賃料改定時期：{{ $seasonsText[$item->regular_leased_season] ?? "" }}
                                        {{ $item->regular_leased_season == 1 ? $item->regular_leased_season_nen . "年毎" : "" }}
                          </span>
                                    <br>
                                    <span>
                              @php
                                  $costsText = ["未選択", "公式", "事前協議により決定"];
                              @endphp
                              定期借地権賃料改定額：{{ $costsText[$item->regular_leased_cost] ?? "" }}
                          </span>
                                    <br>
                                    <span>
                              @php
                                  $transfersText = ["未選択", "可", "不可"];
                              @endphp
                              定期借地権譲渡転貸：{{ $transfersText[$item->regular_leased_transfer] ?? "" }}
                                        @if ($item->regular_leased_transfer == 1)
                                            <br>
                                            <span>
                                      @php
                                          $transferMethodsText = ["未選択", "承諾不要", "通知要", "承諾要"];
                                      @endphp
                                      &nbsp;&nbsp;&nbsp;承諾要否・方法：{{ $transferMethodsText[$item->regular_leased_transfer_method] }}
                                  </span>
                                            <br>
                                            <span>
                                      @php
                                          $transferNecessitiesText = ["未選択", "要", "不要", "未定"];
                                      @endphp
                                      &nbsp;&nbsp;&nbsp;承諾料要否：{{ $transferNecessitiesText[$item->regular_leased_transfer_necessity] }}
                                  </span>
                                            <br>
                                            <span>
                                      @php
                                          $transferConsentsText = ["未選択", "地主", "転貸主"];
                                      @endphp
                                      &nbsp;&nbsp;&nbsp;承諾者：{{ $transferConsentsText[$item->regular_leased_transfer_consent] }}
                                  </span>
                                        @endif
                          </span>
                                    <br>
                                @endif
                                @break
                            @endswitch

                        @endif
                        @if(isset($item->dataLand) && ($item->dataLand->land_right == 2 or $item->dataLand->land_right == 3))
                            ■@include('business.objects.components.land-right', ['dataLand' => $item->dataLand])
                        @endif
                        @if (empty($item->mansion) and $item->getLowRestrictionName())
                            ■法令上の制限：{{str_replace('<br>',', ',$item->getLowRestrictionName())}}
                        @elseif(!empty($item->mansion) && $item->mansion->getLowRestrictionName())
                            ■法令上の制限：{{str_replace('<br>',', ',$item->mansion->getLowRestrictionName())}}
                        @endif
                        @if (empty($item->mansion) and $item->getOtherRestriction())
                            ■その他制限事項：{{str_replace('<br>',', ',$item->getOtherRestriction())}}
                        @elseif(!empty($item->mansion) && $item->mansion->getOtherRestriction())
                            ■その他制限事項：{{str_replace('<br>',', ',$item->mansion->getOtherRestriction())}}
                        @endif
                        @if($item->getExteriorHTML() and $item->getExteriorHTML()!='無')
                            ■リフォーム外装：{!! $item->getExteriorHTML() !!}
                        @endif
                        @if($item->getInteriorHTML() and $item->getInteriorHTML()!='無')
                            ■リフォーム内装：{!! $item->getInteriorHTML() !!}
                        @endif
                        @if($item->architecture_no)
                            ■建築確認：{{$item->architecture_no??'-'}}
                        @endif
                        @if( $item->develop_num)
                            ■開発許可：{{$item->develop_num??'-'}}
                        @endif
                </span>
                    <span class="p-detail-main-sheet__left-right">
                    ■図面と現況が異なる場合は、現況優先とします。■掲載物件は成約済・売却中止になる場合があります。
                </span>
            </div>
            </div>
        @endif
    @else
        <div>
            <p class="p-detail-main-sheet__left-catch">{{$item->catchcopy}}</p>
            @if (!empty($item->point))
                <ul class="p-detail-main-sheet__left-points">
                    <li class="p-detail-main-sheet__left-point">{!! nl2br(e($item->point)) !!}</li>
                </ul>
            @endif
            <ul class="w-100 list-unstyled">
                @if(!empty($item->photos) && is_array($item->photos))
                    @foreach($item->photos as $index => $photo)
                        <li class="p-detail-main-sheet__left-photo">
                            <div class="p-detail-main-sheet__left-border"><img src="{{$photo->disp_file_path}}" {{$index != 0 ? 'style=width:100%' : ''}}></div>
                        </li>
                        @php if($index==2){ break; } @endphp
                    @endforeach
                @else
                    <li class="p-detail-main-sheet__left-photo" style="width: 100%">
                        <div class="p-detail-main-sheet__left-noimage">
                            <span>No Image</span>
                        </div>
                    </li>
                @endif
            </ul>
        </div>
    @endif
</div>

