@extends('layouts.main')

@php
    use App\Models\Util\Status;
@endphp

@section('title', 'PADs')

@section('header')
    @include('layouts.header', [
        'user' => Auth::user(),
    ])
@endsection

@section('nav')
    @include('layouts.navigation', [
        'menu' => $menu,
    ])
@endsection

@section('body')
    <div class="d-flex">
        @foreach($userPads as $userPad)
            <div class="card mx-2" style="width: 12rem;">
                <div class="card-body">
                    @if($userPad->pad->status === Status::ATIVO)
                        <h1 class="text-center"> <i class="bi bi-book-half"></i> </h1>
                    @else
                        <h1 class="text-center"> <i class="bi bi-journal-bookmark-fill"></i> </h1>
                    @endif
                    <h5 class="text-center"> PAD: {{ $userPad->pad->nome }} </h4>
                    <h5 class="text-center"> Status: {{ $userPad->pad->statusAsString() }} </h4>
                    <a class="stretched-link" href="{{ route('pad_view', ['id' => $userPad->id]) }}"></a>
                </div>
            </div>
        @endforeach
    </div>
@endsection
