@isset($pageConfigs)
  {!! Helper::updatePageConfig($pageConfigs) !!}
@endisset

@php
  $configData = Helper::appClasses();
  use Illuminate\Support\Facades\Auth;
  use Illuminate\Support\Facades\Route;
@endphp

@extends('layouts/commonMaster')

@section('layoutContent')

  <div class="d-flex flex-column min-vh-100">
    <div class="container-xxl flex-grow-1 p-0">
      <div class="row mt-3 mb-3 position-relative" style="z-index: 10;">
        <div class="col-12 d-flex justify-content-between align-items-center">
          <!-- Pulsante Indietro a sinistra -->
          <div>
            @if(Route::is('segnalazione.nuova') || Route::is('segnalazione.show'))
            <a style="" href="{{ url()->previous() }}" class="btn btn-outline-secondary">
              <i class="bx bx-arrow-back me-1"></i>Indietro
            </a>
            @endif
          </div>

          <!-- Pulsanti a destra -->
          <div class="d-flex gap-2 align-items-center" >
            @guest
            <a href="{{ route('login') }}" class="btn btn-primary" style="display: none;">
              <i class="bx bx-log-in me-1"></i>Accedi
            </a>
            @endguest
            
          </div>
        </div>
      </div>
      <!-- <div class="row">
          <div class="col-md-12 text-center">
            <img src="{{ asset('assets/img/logoRSAPiccinelli.png') }}" class="img-fluid h-px-100 mb-2">
          </div>
        </div> -->

      <div class="misc-wrapper {{ Route::is('welcome') ? 'misc-wrapper--welcome-bacheca' : '' }}">
        <!-- Content -->
        @hasSection('content')
          @yield('content')
        @else
          {{ $slot ?? '' }}
        @endif
        <!--/ Content -->
      </div>
        @yield('page-script')


    </div>
    @include('layouts/sections/footer/footer')
  </div>
@endsection
