<script src="{{asset('assets/js/app.js')}}"></script>
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg">
    <div class="modal-content">
    <div class="modal-header">
    <h6 class="modal-title" id="staticBackdropLabel">{{__('app.available_broadcasts')}}</h6>
    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  </div>
  <div class="modal-body mt-3">
    <div class="box-body">
      <div class="row">
      @forelse(\App\Models\Broadcast::app()->get() as $broadcast)
      <div class='col-md-4 padding-top-10'><button class="btn btn-outline-primary btn-xs" onclick="insertCKEDITOR('{{ $broadcast->id }}', '/broadcast/html/', '{{$broadcast->email_subject}}')">{{ $broadcast->name }}</button></div>
      @empty
      <div class="col-md-offset-2 col-md-10">
        <h3>{{ __('app.no_broadcast_found') }}</h3>
      </div>
      @endforelse
    </div>
    </div>
  </div>
  <div class="modal-footer">
      <button type="button" class="btn btn-danger" data-bs-dismiss="modal">{{__('app.close')}}</button>
      <a href="{{ route('broadcasts.create') }}">
        <button class="btn btn-primary">{{ __('app.add_new_campaign') }}</button>
      </a>
  </div>
</div>
<span id="insert-template-msg" data-value="{{__('app.insert_broadcast_msg')}}"></span>