<?php
use Illuminate\Support\Str;

try{
  $text = Str::replace('PARROCCHIA_INDIRIZZO', $parrocchia->indirizzo, $config->value);
  $text = Str::replace('PARROCCHIA_NOME', $parrocchia->nome, $text);
  $text = Str::replace('PARROCCHIA_COMUNE', $parrocchia->comune!=null?$parrocchia->comune->getLabel():'', $text);
  $text = Str::replace('PARROCCHIA_PARROCO', $parrocchia->nome_parroco, $text);
}catch(\Exception $e){
  $text = $config->value;
}

 ?>
<div class="modal-header">
  <h1><i class="fas fa-info"></i> {{ $config->display_name }}</h1>
</div>



<div class="modal-body" >
  <div class="row justify-content-center">
    <div class="col">
      {!! $text !!}
    </div>
  </div>
</div>

<div class="modal-footer">
  <button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
</div>



<script>

$(document).ready(function(){
  $.ajaxSetup({
    headers: {
      'X-CSRF-TOKEN': '{{csrf_token()}}'
    }
  });
});
</script>
