@extends('layouts.public-master')
@section('title', 'سوالات متداول - ')
@section('main')

<main class="container mb-5">
    <h2 class="mb-4">سوالات متداول</h2>
    <div class="row">
        <div class="col-12">
            <div id="accordion">
            @forelse($faqs as $faq)
                <div class="card">
                    <div class="card-header" id="faqHeader-{{ $faq->id }}">
                        <h5 class="mb-0">
                            <button class="btn btn-link collapsed" data-toggle="collapse" data-target="#faq-{{ $faq->id }}" aria-expanded="false" aria-controls="faq-{{ $faq->id }}">
                                {{ $faq->title }}
                            </button>
                        </h5>
                    </div>
                    <div id="faq-{{ $faq->id }}" class="collapse" aria-labelledby="faqHeader-{{ $faq->id }}" data-parent="#accordion">
                        <div class="card-body">
                            {!! clean($faq->content) !!}
                        </div>
                    </div>
                </div>
            @empty
                <h3>داده ای یافت نشد!</h3>
            @endforelse
            </div>
        </div>
    </div>
</main>
@endsection