

<section class="p-detail-header <?php echo e(!empty(request()->get('hidden_pagination')) ? "hidden-pagination" : ""); ?>">
    <div class="p-detail-header__wrapper">
        <div class="p-detail-header__results">
            <h2 class="p-detail-header__results-title">
              <?php if($item->status == 4 or $item->status == 5): ?>
              成約物件 詳細
              <?php elseif($item->property == 99): ?>
              分譲地 詳細
              <?php elseif(strstr($_SERVER['REQUEST_URI'],'/mansion/')): ?>
                    <?php if(strstr($_SERVER['REQUEST_URI'],'/detail/')): ?>
                        売出物件 詳細
                    <?php else: ?>
                        マンション建物 詳細
                    <?php endif; ?>
              <?php else: ?>
              売出物件 詳細
              <?php endif; ?>
            </h2>

            <div class="p-detail-header__results-count">
                <?php if(request()->method() == 'GET'): ?>
                    <?php $total_article = 1; ?>
                    <?php if(strpos(url()->full(), '/for-sale/detail') != false): ?>
                        <script>
                            var id = parseInt($('.frm-check').attr('data-check'));
                            var items = [];
                            items.push(id);
                            localStorage.setItem('page_items', JSON.stringify(items));
                        </script>
                    <?php endif; ?>
                <?php endif; ?>
                <?php if(isset($isForSale) && $isForSale  == true): ?>
                    <?php echo $__env->make('business.objects.components.count_article_detail', ['count' => $number, 'total' => $total_article ?? ""], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php else: ?>
                    <?php
                        if (isset($params['building_id_print']) && !empty($params['building_id_print'])) {
                            $total_article = count(explode(',', $params['building_id_print']));
                        }
                    ?>
                    <?php echo $__env->make('business.objects.components.count_article_mansion_detail', ['count' => $number, 'total' => $total_article ?? ""], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php endif; ?>
                <ul>
                    <li><a href="#" class="first_item">&lt;&lt;</a></li>
                    <li><a href="#" class="prev_item">&lt;</a></li>
                    <li><a href="#" class="next_item">&gt;</a></li>
                    <li><a href="#" class="last_item">&gt;&gt;</a></li>
                </ul>
            </div>
        </div>
        <div class="d-flex justify-content-end ">
            <div class="d-flex justify-content-end main-header"<?php if($item->property!=6 && $item->property!=7 && $item->property!=99): ?> id="not-mansion" <?php endif; ?>>
              <!--<ul class="p-detail-header__button-list">
                  <li>
                      <p class="p-detail-header__button-list-count">当物件<br>(1)</p>
                  </li>
                  <li>
                      <?php echo $__env->make('business.objects.components.circle-btn',
                          ['id' => 'btnSinglePrint', 'class' => 'c-circle-btn__print btnSinglePrint', 'linkUrl' => 'javascript:void(0);',
                          'img' => '/business/img/icon_print.png', 'title' => '印刷'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                  </li>
                  <li>
                      <?php echo $__env->make('business.objects.components.circle-btn',
                          ['id' => 'btnSinglePdf', 'class' => 'c-circle-btn__pdf btnSinglePdf', 'linkUrl' => 'javascript:void(0);',
                          'img' => '/business/img/icon_pdf.png', 'title' => 'PDF'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                  </li>
              </ul>
                <ul class="p-detail-header__button-list total_count">
                    <li>
                        <p class="p-detail-header__button-list-count">全物件<br>(<?php echo e($count ?? '0'); ?>)</p>
                    </li>
                    <li>
                        <?php echo $__env->make('business.objects.components.circle-btn',
                            ['id' => 'btnMultiPrint', 'class' => 'c-circle-btn__print btnMultiPrint', 'linkUrl' => 'javascript:void(0);',
                            'img' => '/business/img/icon_print.png', 'title' => '印刷'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    </li>
                    <li>
                        <?php echo $__env->make('business.objects.components.circle-btn',
                            ['id' => 'btnMultiPdf', 'class' => 'c-circle-btn__pdf btnMultiPdf', 'linkUrl' => 'javascript:void(0);',
                            'img' => '/business/img/icon_pdf.png', 'title' => 'PDF'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    </li>
                </ul>-->
                
                    
                    <ul class="p-detail-header__button-list total_count">
                        <li>
                            <?php echo $__env->make('business.objects.components.circle-btn',
                                ['id' => 'btnPrint', 'class' => 'c-circle-btn__print modal-open-set', 'linkUrl' => '#',
                                'img' => '/business/img/icon_print.png', 'title' => '印刷'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </li>
                        <!--<li>
                            <?php echo $__env->make('business.objects.components.circle-btn',
                                ['id' => 'btnPdf', 'class' => 'c-circle-btn__pdf c-circle-btn__aqua modal-open-set-pdf', 'linkUrl' => '#',
                                'img' => '/business/img/icon_pdf.png', 'title' => 'セットPDF'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </li>-->
                    </ul>
                    
                <?php echo $__env->make('business.objects.projects.modal-set', ['property' => $item->property], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('business.objects.projects.modal-set-pdf', ['property' => $item->property] , \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                
            </div>
            <ul class="p-detail-header__button-list">
                <?php if(! request()->get("popup_mansion") && !strstr($_SERVER['REQUEST_URI'],'/mansion/detail/') && !strstr($_SERVER['REQUEST_URI'],'/lot/detail/')): ?>
                <!--<li>
                    <?php echo $__env->make('business.objects.components.link-btn', ['url' => route('business-close'), 'title' => '成約事例', 'class' => 'p-detail-header__button-list--close'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                </li>-->
                    <div id="return-search-id" search-id="<?php echo e($item->building_id); ?>"></div>
                    <li class="<?php echo e(!empty(request()->get('hidden_return')) ? "hidden_return" : ""); ?>">
                        <?php if(request()->method() == 'GET'): ?>
                            <?php
                                $urlReturn = '';
                                if(is_null($item->property)) {
                                    $urlReturn = '/admin/editRoom/'.$item->mansion_id.'/'.$item->building_id;
                                } elseif($item->property < 4) {
                                    $urlReturn = '/admin/editLand/'.$item->building_id;
                                } elseif($item->property < 6) {
                                    $urlReturn = '/admin/editHouse/'.$item->building_id;
                                } elseif($item->property < 8) {
                                    $urlReturn = '/admin/editMansion/'.$item->building_id;
                                }
                            ?>
                            <?php echo $__env->make('business.objects.components.link-btn', ['url' => $urlReturn, 'title' => '戻る', 'class' => 'p-detail-header__button-list--back'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php else: ?>
                           <?php echo $__env->make('business.objects.components.link-btn', ['url' => '#', 'title' => '戻る', 'class' => 'p-detail-header__button-list--back return_search'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endif; ?>
                    </li>
                <?php endif; ?>
            </ul>
        </div>
    </div>
</section>
