<div class="row c-tab d-flex justify-content-between align-items-center">
    <p class="c-tab__title">{{$title??null}}</p>
    @if(!empty($portal_public[0]))
        <div class="portal-public-info d-flex float-left justify-content-center mr-1">
            <label class="label-public">ポータル（{{ $portal_public[0]->created_at ? date( 'Y.m.d/H:i', strtotime($portal_public[0]->created_at)) : '' }}）</label>
            <ul>
                @php
                    $pl_suumo = $pl_homes = $pl_athome = '';
                    foreach($portal_public as $pl){
                        if($pl->type == 1){
                            $pl_suumo = $pl;
                        }
                        if($pl->type == 2){
                            $pl_homes = $pl;
                        }
                        if($pl->type == 3){
                            $pl_athome = $pl;
                        }
                    }
                    $suumo_text = $homes_text = $athome_text = '';
                    if(!empty($pl_suumo)){
                        $suumo_text = '非掲載';
                        if($pl_suumo->status == 1){
                            $suumo_text = 'ネットコマ';
                        }
                        if($pl_suumo->status == 2){
                            $suumo_text = 'レポート';
                        }
                    }
                    if(!empty($pl_homes)){
                        $homes_text = "非掲載";
                        if($pl_homes->status == 1){
                            $homes_text = "掲載";
                        }
                    }
                    if(!empty($pl_athome)){
                        $athome_text = '非公開';
                        if($pl_athome->status == 1){
                            $athome_text = '会員間';
                        }
                        if($pl_athome->status == 2){
                            $athome_text = '会員一般向';
                        }
                        if($pl_athome->status == 3){
                            $athome_text = '一般向';
                        }
                    }
                @endphp
                @if(!empty($store->suumo_id) && !empty($store->suumo_pw))
                    <li class="suumo_color">@if($suumo_text != '')
                            @if(!empty($pl_suumo) && $pl_suumo->status == 0)
                                <img src="/admin/img/suumo-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/suumo-icon.png" width="18" alt="">
                            @endif @php echo $suumo_text == '非掲載' ? '<span class="text-gray">'.$suumo_text.'</span>' : $suumo_text @endphp @endif</li>
                @endif
                @if(!empty($store->homes_id) && !empty($store->homes_pw))
                    <li class="homes_color">@if($homes_text != '')
                            @if(!empty($pl_homes) && $pl_homes->status == 0)
                                <img src="/admin/img/homes-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/homes-icon.png" width="18" alt="">
                            @endif @php echo $homes_text == '非掲載' ? '<span class="text-gray">'.$homes_text.'</span>' : $homes_text @endphp @endif</li>
                @endif
                @if(!empty($store->athome_id) && !empty($store->athome_pw))
                    <li class="athome_color">@if($athome_text != '')
                            @if(!empty($pl_athome) && $pl_athome->status == 0)
                                <img src="/admin/img/athome-icon-o8.png" width="18" alt="">
                            @else
                                <img src="/admin/img/athome-icon.png" width="18" alt="">
                            @endif @php echo $athome_text == '非公開' ? '<span class="text-gray">'.$athome_text.'</span>' : $athome_text @endphp @endif</li>
                @endif
            </ul>
        </div>
    @endif
    <div class="clearfix"></div>
    @include('admin.objects.components.link-btn', ['url' => $back, 'title' => '戻る', 'class' => 'c-tab__backbtn'])
</div>
