@extends('layouts.app')
@section('content')
    <section>
        <div class="container">
            <div class="w-100 mt-3 text-md-center title-bx1">
                <h3 class="one8">Audit Report</h3>
            </div>
        </div>
    </section>
    <section class="land_info_wrap mb-5">
        <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)
                            <a class="nav-link @if($ik==0) active @endif" id="balance_tab" data-toggle="pill" href="#balance-nfo{{ $item['id'] }}" role="tab" aria-controls="balance_info" 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)
                            <div class="tab-pane @if($ik==0) active @endif" id="balance-nfo{{ $item['id'] }}" role="tabpanel">
                                <div class="theme_table">
                                    <table class="table table-bordered">
                                        <thead>
                                            <tr>
                                                <th>Sl</th>
                                                <th>Title</th>
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        @if (count($item['dynamicSections']) > 0)
                                            <tbody>
                                                @foreach ($item['dynamicSections'] as $dynamicSection)
                                                    <tr>
                                                        <td>{{ $dynamicSection['sequence'] }}</td>
                                                        <td>{{ $dynamicSection['title'] }}</td>
                                                        <td>
                                                            <a href="{{ $dynamicSection['file'] }}" target="_blank">Download</a>
                                                        </td>
                                                    </tr>
                                                @endforeach
                                            </tbody>
                                        @endif
                                    </table>
                                </div>
                            </div>
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection
@push('css')
    <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>
@endpush
