@extends('layouts.app')
@section('content')
    <section class="page_title_wrap bottom_border">
        <div class="container">
            <h3>{{ $data['title'] }}</h3>
        </div>
		
    </section>
    <section class="land_info_wrap">
        <div class="container">
            <div class="row">
                <div class="col-lg-3 col-sm-6 col-xs-12">
                    <div class="nav flex-column nav-pills" id="audit-report-tab" role="tablist" aria-orientation="vertical">
                        @foreach ($data['moduleItems'] as $ik => $item)
                            @php $active = ($ik==0) ? 'active' : ''; @endphp
                            <a class="nav-link {{$active}}" id="balanceTab{{$ik}}" data-toggle="pill" href="#balanceInfo{{$ik}}" role="tab" aria-controls="balanceInfo{{$ik}}" aria-selected="true">{{ $item['title'] }}</a>
                        @endforeach
                    </div>
                </div>
                <div class="col-lg-9 col-sm-6 col-xs-12">
                    <div class="tab-content" id="audit-report-tabContent">
                        @foreach ($data['moduleItems'] as $ik => $item)
                            @php $active = ($ik==0) ? 'show active' : ''; @endphp
                            <div class="tab-pane {{$active}}" id="balanceInfo{{$ik}}" role="tabpanel" aria-labelledby="balanceTab{{$ik}}">
                                <div class="theme_table">
                                    <table class="table table-bordered">
                                        <thead>
                                            <tr>
                                                <th>Sl</th>
                                                <th>Semmester</th>
                                                <th>Title</th>
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            @if (count($item['dynamicSections']) > 0)
                                                @foreach ($item['dynamicSections'] as $dynamicSection)
                                                    <tr>
                                                        <td>{{ $dynamicSection['sequence'] }}</td>
                                                        <td>{{ $dynamicSection['description'] }}</td>
                                                        <td>{{ $dynamicSection['title'] }}</td>
                                                        <td><a target="_blank" href="{{ $dynamicSection['file'] }}">Download</a></td>
                                                    </tr>
                                                @endforeach
                                            @endif
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection
<style type="text/css">
    .nav-link {
        padding: 8px 15px;
        font-size: 14px;
        font-weight: 500;
        color: #333;
        background-color: #ededed;
        margin-bottom: 5px;
    }
    .nav-pills .nav-link.active,
    .nav-pills .show>.nav-link {
        background-color: #3476bc !important;
    }
    @media (max-width: 768px) {
        .nav {
            margin-bottom: 20px !important;
        }
    }
</style>
