<?php
    $type = $type ?? 'for-sale';
    if($item->mansion_id!=null){
    $mansion = $item->getMansion();
    }
    if (!function_exists('convertLimitString')){
        function convertLimitString($item, $limit = 40, $type = 'memo'){
            if($type == 'memo'){
                $text = html_entity_decode($item->memo_business);
            } elseif ($type == 'catchcopy'){
                $text = html_entity_decode($item->catchcopy);
            }
//            {!!strlen($item->memo_business) > 40 ? mb_substr($item->memo_business, 0, 40,"UTF-8") : $item->memo_business!!}
            $txtLength =  mb_strlen($text, 'utf8');
            if($txtLength > $limit){
                return  htmlentities(mb_substr($text,0,$limit,"UTF-8"));
            }
            return $text;
        }
    }
?>

<?php
    $dataLand = $item;
    if ($mansion = $item->getMansion())
    $dataLand = $mansion;
?>
<style>
    .list-inline li {
        display: inline-block !important;
    }

    .list-inline li:first-child {
        max-width: 40%
    }

    .p-detail-main-sheet__shop-address span {
        //max-width: 78%;
        //float: right;
    }
</style>
<div class="p-detail-main-sheet p-detail-main origin-content theme theme-1">
    <div class="justify-content-between">
        <?php echo $__env->make('business.objects.projects.image-print-small',['point_recommend_full'=>false], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <?php echo $__env->make('business.objects.projects.detail-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <div class="clear"></div>
    </div>
    <?php echo $__env->make('business.objects.projects.shop-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>

<div
    class="main-content p-detail-main-sheet p-detail-main new-content <?php if($item->vertical === 1): ?><?php echo e('vertical'); ?><?php else: ?> <?php echo e('horizontal'); ?><?php endif; ?> <?php if($item->sheet_file_type === 1): ?> <?php echo e('sheet-1'); ?> <?php endif; ?>">
    <div data-vertical="<?php echo e($item->vertical); ?>"
         class="justify-content-between preview-image-board-container print-preview-theme" id="print-preview-theme">
        <div class="header-content" id="header-content">
            <div class="header-content-stamp">
                <img class="stamp1">
            </div>

            
            <?php if(auth()->user()->company_id == 3): ?>
                <?php if($item->is_home): ?>
                    
                    <?php if(in_array($item->property, [4, 5])): ?>
                        <?php if($item->property_sub === \App\Models\MstPropertyType::NEW): ?>
                            <?php echo $__env->make('business.objects.projects.print.header-logo.house-header-new-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php else: ?>
                            <?php echo $__env->make('business.objects.projects.print.header-logo.house-header-old-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                    
                <?php elseif($item->is_land): ?>
                    <?php echo $__env->make('business.objects.projects.print.header-logo.land-header-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php elseif($item->is_room): ?>
                    <?php echo $__env->make('business.objects.projects.print.header-logo.room-header-print', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php endif; ?>
            <?php else: ?>
                <?php if($item->is_home): ?>
                    
                    <?php if($item->property_sub === \App\Models\MstPropertyType::NEW): ?>
                        <?php echo $__env->make('business.objects.projects.print.header-logo.standard-company.house-header-new-std', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <?php else: ?>
                        <?php echo $__env->make('business.objects.projects.print.header-logo.standard-company.house-header-old-std', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <?php endif; ?>
                    
                <?php elseif($item->is_land): ?>
                    <?php echo $__env->make('business.objects.projects.print.header-logo.standard-company.land-header-std', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php elseif($item->is_room): ?>
                    <?php echo $__env->make('business.objects.projects.print.header-logo.standard-company.room-header-std', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php endif; ?>
            <?php endif; ?>


            <div class="header-content-info">
                <div class="header-content-info--sub">
                    <?php if($item->status == 4): ?>
                        <span class="p-detail-main-sheet__left-name__icon-status">契約済</span>
                    <?php elseif($item->status == 5): ?>
                        <span class="p-detail-main-sheet__left-name__icon-status">売りやめ</span>
                    <?php endif; ?>
                    <span><b><?php echo e($item->article_name); ?></b></span>
                </div>
                <div class="sub-info">
                    <div class="subinfo-txt pl-0">
                        <span><b><?php echo e($item->getSheetCopy2(25)); ?></b></span>
                    </div>
                    <div class="subinfo-num">
                        <?php if($item->status != 4 and $item->status != 5): ?>
                            <b><span>
                                    <span><?php echo e(number_format($item->price, 0, ",", ",")); ?></span>
                                    <span class="suffix">万円</span>
                                </span>
                                <span class="suffix"><?php echo e(getDescriptionTax($item->tax)); ?></span>
                            </b>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

        <div class="sheet-content">
            <?php echo $__env->make('business.objects.projects.image-print-large', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php if($item->is_home): ?>
                <?php echo $__env->make('business.objects.projects.print.detail-house', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('business.objects.projects.print.detail-house-small', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php elseif($item->is_land): ?>
                <?php echo $__env->make('business.objects.projects.print.detail-land', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('business.objects.projects.print.detail-land-small', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php elseif($item->is_room): ?>
                <?php echo $__env->make('business.objects.projects.print.detail-room', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <?php echo $__env->make('business.objects.projects.print.detail-room-small', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php endif; ?>
        </div>

        <div class="clear"></div>
        <div class="header-content-stamp-2">
            <img class="stamp2">
        </div>
        <div class="header-content-stamp-3">
            <img class="stamp3">
        </div>
    </div>
    <?php echo $__env->make('business.objects.projects.shop-print-large', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>




