@extends('web.layouts.container')
@section('css')
    <style>
        .issue_order .sub_title {
            padding-right: 30px;
            position: relative;
        }
        .issue_order .sub_title::before {
            position: absolute;
            content: "";
            right: 0;
            top: 10px;
            width: 12px;
            height: 12px;
            background-color: #232e4e;
        }
        .issue_order .issue_body {
            margin-top: 30px;
            padding: 30px;
            background-color: #fafafa;
        }
        .issue_order .issue_card .files_sended .img {
            padding: 20px;
            background-color: #fff;
            border-radius: 10px;
            display: flex;
            align-items: center;
            box-shadow: 0 0 15px #00000005;
            margin-top: 15px;
            justify-content: center;
            line-height: 1;
        }
    </style>
@endsection
@section('content')
    <section class="inner_header">
        <img src="{{asset('assets/web/images/icons/inner.svg')}}" alt="" class="inner_shap">
        <div class="container">
            <ul class="links">
                <li>
                    <a href="{{LaravelLocalization::getLocalizedURL($lang, route('home'), [], true)}}">{{__('main.home')}}</a>
                </li>
                <li>
                    <a href="#"> {{$title}} </a>
                </li>
            </ul>
            <h4>{{$title}}</h4>
        </div>
    </section>
    <section class="consultation-sec section_padding">
        <div class="container">

            @if(count($otherRequests))
                @foreach($otherRequests as $otherRequest)
                    <div class="box issue_order mb-3">
                        <div class="issue_head">
                            <div class="row align-items-center">
                                <div class="col-lg-8">
                                    <div class="issue_title">
                                        <h3> <img src="{{asset('assets/web/images/sec_head_sh.svg')}}" alt="" class="me-2">  <span>{{$otherRequest->topicName}}</span> </h3>
                                    </div>
                                </div>
                                <div class="col-lg-4 text-lg-end">
                                    <h5 class="issue_number">{{__('otherRequests.request_no') . ': ' . $otherRequest->id}}</h5>
                                </div>
                            </div>
                        </div>
                        <div class="issue_body ">
                            <div class="issue_card mb-4">
                                <h5 class="sub_title mb-3">{{__('otherRequests.request_type')}}</h5>
                                <p class="text">{{$otherRequest->request_type}}</p>
                            </div>
                            <div class="issue_card mb-4">
                                <h5 class="sub_title mb-3">{{__('otherRequests.details')}}</h5>
                                <p class="text">{{$otherRequest->details}}</p>
                            </div>
                            @if(is_array($otherRequest->files) && count($otherRequest->files))
                            <div class="issue_card mb-4">
                                <h5 class="sub_title mb-3">{{__('otherRequests.request_attachments')}}</h5>
                                <div class="files_sended">
                                    <div class="row case_file_container_1">
                                        @foreach($otherRequest->files as $file)
                                            @if(strpos($file, '.pdf'))
                                                <div class="col-lg-3">
                                                    <a download href="{{asset($file)}}" class="img">
                                                        <i class="bi bi-file-pdf fs-5 me-2"></i>
                                                        <h6> {{__('otherRequests.file')}} </h6>
                                                    </a>
                                                </div>
                                            @else
                                                <div class="col-lg-3">
                                                    <a href="{{asset($file)}}" class="img" data-fancybox>
                                                        <i class="bi bi-image fs-5 me-2"></i>
                                                        <h6> {{__('otherRequests.image')}} </h6>
                                                    </a>
                                                </div>
                                            @endif
                                        @endforeach
                                    </div>
                                </div>
                            </div>
                            @endif
                        </div>
                    </div>
                @endforeach
            @else
                <div class="alert alert-secondary text-danger text-center">{{__('otherRequests.no_data')}}</div>
            @endif
        </div>
    </section>
@endsection

@section('inner_js')

@endsection
