@php
    $advertisingModalSettings = getAdvertisingModalSettings();
@endphp

@if(!empty($advertisingModalSettings))
    <div class="d-none" id="advertisingModalSettings">
        <div class="advertising-modal-wrap position-relative">
            <button type="button" class="btn-close-advertising-modal close-swl btn-transparent d-flex align-items-center justify-content-center" aria-label="{{ trans('public.close') }}">
                <i data-feather="x" width="22" height="22"></i>
            </button>

            @if(!empty($advertisingModalSettings['title']))
                <h3 class="section-title font-16 text-dark-blue mb-15 pr-40">{{ $advertisingModalSettings['title'] }}</h3>
            @endif

            <div class="d-flex align-items-center justify-content-center">
                <img src="{{ $advertisingModalSettings['image'] ?? '' }}" class="img-fluid rounded-lg advertising-modal-image" alt="{{ $advertisingModalSettings['title'] ?? 'ads' }}">
            </div>

            @if(!empty($advertisingModalSettings['description']))
                <p class="font-14 text-gray mt-20">{!! $advertisingModalSettings['description'] !!}</p>
            @endif

            <div class="row align-items-center mt-20 mx-0">
                @if(!empty($advertisingModalSettings['button1']) and !empty($advertisingModalSettings['button1']['link']) and !empty($advertisingModalSettings['button1']['title']))
                    <div class="col-12 col-sm-6 mb-10 mb-sm-0 px-5">
                        <a href="{{ $advertisingModalSettings['button1']['link'] }}" class="btn btn-primary btn-sm btn-block">{{ $advertisingModalSettings['button1']['title'] }}</a>
                    </div>
                @endif

                @if(!empty($advertisingModalSettings['button2']) and !empty($advertisingModalSettings['button2']['link']) and !empty($advertisingModalSettings['button2']['title']))
                    <div class="col-12 col-sm-6 px-5">
                        <a href="{{ $advertisingModalSettings['button2']['link'] }}" class="btn btn-outline-primary btn-sm btn-block">{{ $advertisingModalSettings['button2']['title'] }}</a>
                    </div>
                @endif
            </div>
        </div>
    </div>
@endif
