@extends('layouts.installer')

@section('content')
    <div class="container">
        <div class="row justify-content-center align-content-center" style="height: 75vh;">
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header" style="background: #d9dce2;">
                        <h1 class="h5 text-center m-0 card-title">Permissions</h1>
                    </div>
                    <div class="card-body px-md-5">
                        <table class="table table-bordered mb-5">
                            <tbody>
                                @foreach ($permissions['permissions'] as $permission)
                                    <tr>
                                        <td>engine/{{ $permission['folder'] }}</td>
                                        <td class="text-center" style="background: #eef0f4;">
                                            <i class="fas fa-{{ $permission['isSet'] ? 'check-circle text-success' : 'exclamation-circle text-danger' }} mr-2" aria-hidden="true"></i>
                                            <span class="font-weight-bold">{{ $permission['permission'] }}</span>
                                        </td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>

                        <footer class="text-center">
                            @if ( ! isset($permissions['errors']))
                                <a href="{{ route('install.environment') }}" class="btn btn-info">Configure <i class="ml-2 fas fa-chevron-right"></i></a>
                            @endif
                        </footer>

                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
