@php
$fileIcons = [
'pdf' => ['bg' => 'rgba(240,101,72,0.12)', 'color' => '#f06548', 'svg' => ''],
'doc' => ['bg' => 'rgba(64,81,137,0.12)', 'color' => '#405189', 'svg' => ''],
'xls' => ['bg' => 'rgba(10,179,156,0.12)', 'color' => '#0ab39c', 'svg' => ''],
'ppt' => ['bg' => 'rgba(247,184,75,0.12)', 'color' => '#f7b84b', 'svg' => ''],
'zip' => ['bg' => 'rgba(108,117,125,0.12)', 'color' => '#6c757d', 'svg' => ''],
'image' => ['bg' => 'rgba(122,90,248,0.12)', 'color' => '#7a5af8', 'svg' => ''],
'text' => ['bg' => 'rgba(64,81,137,0.12)', 'color' => '#405189', 'svg' => ''],
'file' => ['bg' => 'rgba(108,117,125,0.12)', 'color' => '#6c757d', 'svg' => ''],
];
@endphp
@if($errors->any())
@foreach($errors->all() as $err)
{{ $err }}
@endforeach
@endif
@forelse($group->files()->latest()->get() as $file)
@php
$icon = $fileIcons[$file->iconKey()] ?? $fileIcons['file'];
@endphp
{{ $file->original_name }}
{{ $file->humanSize() }}
•
{{ $file->uploader?->name ?? __('common.deleted_user') }}
•
{{ $file->created_at->diffForHumans() }}
@if($file->uploaded_by === auth()->id() || auth()->user()->isAdmin())
@endif
@empty
{{ __('group_files.empty') }}
{{ __('group_files.hint') }}
@endforelse