@extends('business.layouts.base')

{{-- header --}}
@section('contents-header')
    @include('business.objects.projects.detail-header', ['number' => '1', 'totalCount' => '10', 'noSetPrint' => true])
@endsection

@php
  // tab
  $tabs = [];

  $tab = new stdClass();
  $tab->title = '自社物件シート';
  $tab->id = 'nav-property-tab';
  $tab->href = 'nav-property';
  $tab->active = 'active';
  array_push($tabs, $tab);

  $tab = new stdClass();
  $tab->title = '写真';
  $tab->id = 'nav-photo-tab';
  $tab->href = 'nav-photo';
  $tab->active = '';
  array_push($tabs, $tab);

  $tab = new stdClass();
  $tab->title = '周辺施設';
  $tab->id = 'nav-map-tab';
  $tab->href = 'nav-map';
  $tab->active = '';
  array_push($tabs, $tab);

  $tab = new stdClass();
  $tab->title = '売出・成約';
  $tab->id = 'nav-summary-tab';
  $tab->href = 'nav-summary';
  $tab->active = '';
  array_push($tabs, $tab);

@endphp

@section('contents')
<div class="mt-4" id="page-mansion">

  {{-- tab contents --}}
  @include('business.objects.projects.detail-tab', ['tabs' => $tabs])
  <div class="tab-content">
    <div class="tab-pane bg-white active" id="nav-property" role="tabpanel" aria-labelledby="nav-property-tab">
      @include('business.objects.projects.detail-main-mansion-sheet',['pref' => $pref, 'city' =>$city,'town'=>$town])
    </div>
    <div class="tab-pane bg-white" id="nav-photo" role="tabpanel" aria-labelledby="nav-photo-tab">
      @include('business.objects.projects.detail-photo', ['data' => $article_list])
    </div>
    <div class="tab-pane bg-white" id="nav-map" role="tabpanel" aria-labelledby="nav-map-tab">
      @include('business.objects.projects.detail-map-around', ['data' => $article_list])
    </div>
    <div class="tab-pane bg-white" id="nav-summary" role="tabpanel" aria-labelledby="nav-summary-tab">
      @include('business.objects.projects.detail-soldout', ['data' => $article_list])
    </div>
  </div>
    @php
        if(isset($params['total_article']) && $params['total_article'] == 1) {
            $params['property'][0] = 6;
            $params['building_id'][0] = $item->building_id;
        }
    @endphp
    @include('business.objects.projects.form-to-other', ['action' => '/business/mansion/parentDetail/'.$item->building_id, 'id' => 'multiPrintForm', 'params' => $params, 'print_action' => true])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print'), 'id' => 'singlePrintForm', 'params' => $params])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setprint-vendor'), 'id' => 'multiPrintFormVendor', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print-vendor'), 'id' => 'singlePrintFormVendor', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setprint-set1'), 'id' => 'multiPrintFormSet1', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print-set1'), 'id' => 'singlePrintFormSet1', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setprint-set2'), 'id' => 'multiPrintFormSet2', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print-set2'), 'id' => 'singlePrintFormSet2', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setprint-set3'), 'id' => 'multiPrintFormSet3', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print-set3'), 'id' => 'singlePrintFormSet3', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setpdf'), 'id' => 'multiPdfForm', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-pdf'), 'id' => 'singlePdfForm', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setpdf-vendor'), 'id' => 'multiPdfFormVendor', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-pdf-vendor'), 'id' => 'singlePdfFormVendor', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setpdf-set1'), 'id' => 'multiPdfFormSet1', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-pdf-set1'), 'id' => 'singlePdfFormSet1', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setpdf-set2'), 'id' => 'multiPdfFormSet2', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-pdf-set2'), 'id' => 'singlePdfFormSet2', 'params' => $params_single])

    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setpdf-set3'), 'id' => 'multiPdfFormSet3', 'params' => $params])
    @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-pdf-set3'), 'id' => 'singlePdfFormSet3', 'params' => $params_single])


    <div id="modal-content" class="modal-contents">
        <input type="hidden" value="" id="type" >
        <div id="modal_open" class="p-print-modal">
            <header id="modal_header" style="text-align:right;">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="modal-close" style="color:gray; font-weight:bold; font-size:30px; padding:0px; line-height:20px;background:none;">×</button>
            </header>
            <main id="modal_main">
                <p class="p-print-modal__title">レイアウトをお選びください。</p>
                <ul class="p-print-modal__menus d-flex">
                    <li>
                        <p class="p-print-modal__menus-icon">
                            <a href="javascript:void(0);" class="btnPhotoPrint" data-n="4">
                                <span class="p-print-modal__menus-text">４枚ずつ</span>
                                <img src="/business/img/layout2x2.png" width="120">
                            </a>
                        </p>
                    </li>
                    <li>
                        <p class="p-print-modal__menus-icon">
                            <a href="javascript:void(0);" class="btnPhotoPrint" data-n="12">
                                <span class="p-print-modal__menus-text">12枚ずつ</span>
                                <img src="/business/img/layout3x4.png" width="120">
                            </a>
                        </p>
                    </li>
                    <li>
                        <p class="p-print-modal__menus-icon">
                            <a href="javascript:void(0);" class="btnPhotoPrint" data-n="24">
                                <span class="p-print-modal__menus-text">24枚ずつ</span>
                                <img src="/business/img/layout4x6.png" width="120">
                            </a>
                        </p>
                    </li>
                </ul>
            </main>
            <footer id="modal_footer">
            </footer>
        </div>
    </div>

    <form action="/business/mansion" method="post" id="return_form">
        @foreach($params as $key => $value)
            @if(!is_array($value))
                <input type="hidden" name="{{$key}}" value="{{$value}}">
            @else
                @foreach($value as $v)
                    <input type="hidden" name="{{$key}}[]" value="{{$v}}">
                @endforeach
            @endif
        @endforeach
        @csrf
    </form>
</div>
@endsection
