{{-- 物件詳細のヘッダー部
    $type : 'for-sale', 'close', 'houses', 'mansion'のいずれかを設定。表示制御に利用。
--}}

@php
$isSetPrint = false;
$type = $type ?? 'for-sale';
if ($type == 'for-sale') {
    $isSetPrint = true;
} else if($type == 'close') {
    $isSetPrint = false;
} else if($type == 'houses') {
    $isSetPrint = false;
} else {
    $isSetPrint = false;
}
@endphp

<section class="p-detail-header">
    <div class="p-detail-header__wrapper">
        <div class="p-detail-header__results">
            <h2 class="p-detail-header__results-title">物件詳細</h2>
            <div class="p-detail-header__results-count">
                <p class="p-detail-header__results-total">{{$number ?? '0'}} / {{$count ?? '0'}}</p>

                <!-- <ul>
                    <li><a href="#">&lt;&lt;</a></li>
                    <li><a href="#">&lt;</a></li>
                    <li><a href="#">&gt;</a></li>
                    <li><a href="#">&gt;&gt;</a></li>
                </ul> -->
            </div>
        </div>
        <div class="d-flex justify-content-end ">
            <div class="d-flex justify-content-end main-header">
                @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-setprint'), 'id' => 'multiPrintForm', 'params' => $params])
                @include('business.objects.projects.form-to-other', ['action' => route('business-for-sale-print'), 'id' => 'singlePrintForm', 'params' => $params_single])

                @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])
                @if($isSetPrint)
                <ul class="p-detail-header__button-list">
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnPrint', 'class' => 'c-circle-btn__print c-circle-btn__aqua modal-open-set', 'linkUrl' => '#',
                            'img' => '/business/img/menu_icon2.png', 'title' => 'セット印刷'])
                    </li>
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnPdf', 'class' => 'c-circle-btn__pdf c-circle-btn__aqua modal-open-set-pdf', 'linkUrl' => '#',
                            'img' => '/business/img/menu_icon2.png', 'title' => 'セットPDF'])
                    </li>
                </ul>
                        @include('business.objects.projects.modal-set')
                        @include('business.objects.projects.modal-set-pdf')
                @endif
                <ul class="p-detail-header__button-list">
                    <li>
                        <p class="p-detail-header__button-list-count">全物件<br>({{$count ?? '0'}})</p>
                    </li>
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnMultiPrint', 'class' => 'c-circle-btn__print', 'linkUrl' => 'javascript:void(0);',
                            'img' => '/business/img/menu_icon2.png', 'title' => '印刷'])
                    </li>
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnMultiPdf', 'class' => 'c-circle-btn__pdf', 'linkUrl' => '#',
                            'img' => '/business/img/menu_icon2.png', 'title' => 'PDF'])
                    </li>
                </ul>
                <ul class="p-detail-header__button-list">
                    <li>
                        <p class="p-detail-header__button-list-count">当物件<br>(1)</p>
                    </li>
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnSinglePrint', 'class' => 'c-circle-btn__print', 'linkUrl' => 'javascript:void(0);',
                            'img' => '/business/img/menu_icon2.png', 'title' => '印刷'])
                    </li>
                    <li>
                        @include('business.objects.components.circle-btn',
                            ['id' => 'btnSinglePdf', 'class' => 'c-circle-btn__pdf', 'linkUrl' => '#',
                            'img' => '/business/img/menu_icon2.png', 'title' => 'PDF'])
                    </li>
                </ul>
            </div>
            <ul class="p-detail-header__button-list">
                <li>
                    @include('business.objects.components.link-btn', ['url' => route('business-close'), 'title' => '成約事例', 'class' => 'p-detail-header__button-list--close'])
                </li>
                <li>
                    @include('business.objects.components.link-btn', ['url' => route('business-top'), 'title' => '戻る', 'class' => 'p-detail-header__button-list--back'])
                </li>
            </ul>
        </div>
    </div>
</section>
