@extends('layouts.main')

@section('title')
    {{__('Show Role')}}
@endsection

@section('content')

    <div class="content-wrapper">
        <div class="page-header">
            <h3 class="page-title">
                {{__('Show Role')}}
            </h3>
            <a class="btn btn-primary mb-2" href="{{ route('roles.index') }}">{{__('Back')}}</a>
        </div>
        <div class="row grid-margin">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-xs-12 col-sm-12 col-md-12">
                                <div class="form-group">
                                    <strong>{{__('Name')}}:</strong>
                                    {{ $role->name }}
                                </div>
                            </div>
                          <div class="col-xs-12 col-sm-12 col-md-12">
                                <div class="row">
                                    @foreach($formattedPermissions as $perm)
                                        <div class="col-lg-3 col-sm-12 col-xs-12 col-md-3">
                                            <label class="label label-success">
                                                {{ __(ucfirst($perm['group'])) }} - {{ __(ucfirst($perm['action'])) }}
                                            </label>
                                        </div>
                                    @endforeach
                                </div>
                            </div>


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