@extends('layouts.app')
@section('title', 'Roller & İzinler')
@section('content')
<div class="bg-white rounded shadow overflow-x-auto">
    <table class="w-full text-sm">
        <thead class="bg-slate-100 text-left"><tr><th class="p-3">Rol</th><th class="p-3">İzin Sayısı</th><th class="p-3">İşlem</th></tr></thead>
        <tbody>
        @foreach ($roles as $role)
            <tr class="border-t">
                <td class="p-3 font-medium">{{ $roleLabels[$role->name] ?? $role->name }}</td>
                <td class="p-3">{{ $role->permissions->count() }}</td>
                <td class="p-3"><a href="{{ route('panel.roles.edit', $role) }}" class="text-blue-600 hover:underline">İzinleri Düzenle</a></td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>
@endsection
