@if(isset($options))
    @if(array_key_exists("tabs",$options) and !blank($options['tabs']))
        <div class="row">
            <div class="col-lg-12">
                <ul class="nav nav-tabs" role="tablist"
                    style="{{$options['styles'] ?? ""}}">
                    @foreach($options['tabs'] as $option)
{{--                        @canany($option['permissions'])--}}
                    @php
                        $visible = $option['visible'] ?? true;
                        $route = $option['content']['table']['route'] ?? $option['table']['route'] ?? "";
                    @endphp
                          @if($visible)
                            <li class="nav-item">
                                <a data-toggle="tab" role="tab"
                                   class="nav-link {{($loop->first) ?"border-left-0 active show":""}}"
                                   id="{{$option['id'] ?? ""}}"
                                   data-id-table = "{{$option['content']['table']['id'] ?? $option['table']['id'] ?? "" }}"
                                   data-route = "{{($route) ? route($route) : ""}}"
                                   data-tab-index = "{{$option['tab-index'] ?? ""}}"
                                   href="#{{$option['href'] ?? ""}}"
                                   aria-controls="{{$option['id'] ?? ""}}"
                                   aria-selected="{{($loop->first) ?"true":"false"}}">
                                    <span class="{{$option['icon'] ?? "" }}"></span>
                                    {{__($option['title'] ?? "")}}
                                </a>
                            </li>
                        @endif
{{--                        @endcanany--}}
                    @endforeach

                </ul>
                <div class="tab-content rows">
                    @foreach($options['tabs'] as $option)

{{--                        @canany($option['permissions'])--}}
                            <div role="tabpanel"
                                 class="row tab-pane fade {{($loop->first) ?"active show":""}}"
                                 id="{{$option['href'] ?? ""}}"
                                 aria-labelledby="{{$option['id'] ?? ""}}">
                                @includeIf(($option['content']['file']), [
                                'table' => $option['content']['table'] ?? null,
                               'options' =>$option,
                             ])
                            </div>
{{--                        @endcanany--}}
                    @endforeach
                </div>
            </div>
        </div>
    @endif
@endisset
