<?php $__env->startSection('title', 'Media Library'); ?>

<?php
    $mediaTypes = ['image' => ['bg' => 'blue', 'icon' => 'M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'], 'video' => ['bg' => 'purple', 'icon' => 'M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664zM21 12a9 9 0 11-18 0 9 9 0 0118 0z'], 'file' => ['bg' => 'gray', 'icon' => 'M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z']];
    $filterParams = array_filter(['mediable_type' => request('mediable_type'), 'mediable_id' => request('mediable_id')]);
?>

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
    <div class="flex flex-wrap items-center justify-between gap-4">
        <div class="flex items-center gap-3">
            <h1 class="text-2xl font-bold text-gray-900">Media Library</h1>
            <?php if($mediableType && $mediableId): ?>
                <span class="px-3 py-1 bg-blue-50 text-blue-700 text-sm rounded-full flex items-center gap-1">
                    <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg>
                    <?php echo e(class_basename($mediableType)); ?> #<?php echo e($mediableId); ?>

                    <a href="<?php echo e(route('admin.media.index')); ?>" class="ml-1 hover:text-blue-900">&times;</a>
                </span>
            <?php endif; ?>
        </div>
        <a href="<?php echo e(route('admin.media.create', $filterParams)); ?>" class="inline-flex items-center gap-2 bg-blue-600 text-white px-5 py-2.5 rounded-lg hover:bg-blue-700 transition text-sm font-medium shadow-sm">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
            Upload File
        </a>
    </div>

    <div class="grid grid-cols-4 gap-4">
        <div class="bg-white border rounded-lg px-4 py-3 flex items-center gap-3">
            <div class="w-10 h-10 rounded-lg bg-blue-50 flex items-center justify-center text-blue-600"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg></div>
            <div><p class="text-lg font-bold"><?php echo e($stats['images']); ?></p><p class="text-xs text-gray-500">Images</p></div>
        </div>
        <div class="bg-white border rounded-lg px-4 py-3 flex items-center gap-3">
            <div class="w-10 h-10 rounded-lg bg-purple-50 flex items-center justify-center text-purple-600"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664zM21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg></div>
            <div><p class="text-lg font-bold"><?php echo e($stats['videos']); ?></p><p class="text-xs text-gray-500">Videos</p></div>
        </div>
        <div class="bg-white border rounded-lg px-4 py-3 flex items-center gap-3">
            <div class="w-10 h-10 rounded-lg bg-gray-50 flex items-center justify-center text-gray-600"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/></svg></div>
            <div><p class="text-lg font-bold"><?php echo e($stats['files']); ?></p><p class="text-xs text-gray-500">Files</p></div>
        </div>
        <div class="bg-white border rounded-lg px-4 py-3 flex items-center gap-3">
            <div class="w-10 h-10 rounded-lg bg-green-50 flex items-center justify-center text-green-600"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"/></svg></div>
            <div><p class="text-lg font-bold"><?php echo e($stats['total']); ?></p><p class="text-xs text-gray-500">Total</p></div>
        </div>
    </div>

    <div class="bg-white border rounded-lg">
        <div class="px-5 py-3 border-b flex flex-wrap items-center justify-between gap-3">
            <div class="flex items-center gap-2">
                <div class="relative">
                    <svg class="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
                    <input type="text" id="mediaSearch" placeholder="Search files..." class="pl-9 pr-3 py-2 border rounded-lg text-sm w-64 focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <select id="filterType" onchange="window.location.href='<?php echo e(route('admin.media.index', array_merge($filterParams, ['view' => $viewMode]))); ?>&filter_type='+this.value" class="border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <option value="">All Types</option>
                    <option value="image" <?php echo e(($filterType ?? '') === 'image' ? 'selected' : ''); ?>>Images</option>
                    <option value="video" <?php echo e(($filterType ?? '') === 'video' ? 'selected' : ''); ?>>Videos</option>
                    <option value="file" <?php echo e(($filterType ?? '') === 'file' ? 'selected' : ''); ?>>Files</option>
                </select>
                <select id="entityFilter" onchange="const v=this.value; if(v){const p=v.split('|');window.location.href='<?php echo e(route('admin.media.index')); ?>?mediable_type='+p[0]+'&mediable_id='+p[1]}else{window.location.href='<?php echo e(route('admin.media.index')); ?>'}" class="border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <option value="">All Entities</option>
                    <option value="">---</option>
                </select>
            </div>
            <div class="flex items-center gap-2">
                <span class="text-sm text-gray-500"><?php echo e($mediaList->count()); ?> file(s)</span>
                <div class="flex border rounded-lg overflow-hidden">
                    <a href="<?php echo e(route('admin.media.index', array_merge($filterParams, ['view' => 'grid', 'filter_type' => $filterType]))); ?>" class="px-3 py-2 <?php echo e($viewMode === 'grid' ? 'bg-blue-50 text-blue-600' : 'text-gray-500 hover:bg-gray-50'); ?> transition">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"/></svg>
                    </a>
                    <a href="<?php echo e(route('admin.media.index', array_merge($filterParams, ['view' => 'list', 'filter_type' => $filterType]))); ?>" class="px-3 py-2 <?php echo e($viewMode === 'list' ? 'bg-blue-50 text-blue-600' : 'text-gray-500 hover:bg-gray-50'); ?> transition">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
                    </a>
                </div>
            </div>
        </div>

        <?php if($mediaList->isEmpty()): ?>
            <div class="text-center py-16">
                <svg class="w-16 h-16 mx-auto text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
                <p class="mt-4 text-gray-500 text-lg">No media files found</p>
                <p class="text-gray-400 text-sm mt-1">Upload your first file to get started.</p>
                <a href="<?php echo e(route('admin.media.create', $filterParams)); ?>" class="mt-4 inline-flex items-center gap-2 bg-blue-600 text-white px-5 py-2 rounded-lg hover:bg-blue-700 transition text-sm font-medium">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
                    Upload File
                </a>
            </div>
        <?php elseif($viewMode === 'list'): ?>
            <div class="overflow-x-auto">
                <table class="w-full">
                    <thead>
                        <tr class="border-b bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                            <th class="px-5 py-3 w-10"><input type="checkbox" class="rounded border-gray-300"></th>
                            <th class="px-5 py-3">Name</th>
                            <th class="px-5 py-3">Type</th>
                            <th class="px-5 py-3">Size</th>
                            <th class="px-5 py-3">Attached To</th>
                            <th class="px-5 py-3">Uploaded</th>
                            <th class="px-5 py-3 text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody class="divide-y divide-gray-100 text-sm" id="mediaList">
                        <?php $__currentLoopData = $mediaList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php $url = Storage::disk('public')->url($media->path); ?>
                            <tr class="hover:bg-gray-50 media-row" data-name="<?php echo e(strtolower($media->filename)); ?>">
                                <td class="px-5 py-3"><input type="checkbox" class="rounded border-gray-300"></td>
                                <td class="px-5 py-3">
                                    <div class="flex items-center gap-3">
                                        <?php if($media->type === 'image'): ?>
                                            <div class="w-10 h-10 rounded-lg overflow-hidden bg-gray-100 flex-shrink-0">
                                                <img src="<?php echo e($url); ?>" alt="" class="w-full h-full object-cover">
                                            </div>
                                        <?php elseif($media->type === 'video'): ?>
                                            <div class="w-10 h-10 rounded-lg bg-purple-50 flex items-center justify-center text-purple-500 flex-shrink-0">
                                                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"/></svg>
                                            </div>
                                        <?php else: ?>
                                            <div class="w-10 h-10 rounded-lg bg-gray-50 flex items-center justify-center text-gray-400 flex-shrink-0">
                                                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/></svg>
                                            </div>
                                        <?php endif; ?>
                                        <div class="min-w-0">
                                            <p class="font-medium text-gray-900 truncate max-w-xs" title="<?php echo e($media->filename); ?>"><?php echo e($media->filename); ?></p>
                                            <p class="text-xs text-gray-400"><?php echo e($media->mime_type ?? ucfirst($media->type)); ?></p>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-5 py-3">
                                    <span class="px-2.5 py-0.5 rounded-full text-xs font-medium bg-<?php echo e($mediaTypes[$media->type]['bg'] ?? 'gray'); ?>-100 text-<?php echo e($mediaTypes[$media->type]['bg'] ?? 'gray'); ?>-700 capitalize"><?php echo e($media->type); ?></span>
                                </td>
                                <td class="px-5 py-3 text-gray-500"><?php echo e(number_format($media->size / 1024, 1)); ?> KB</td>
                                <td class="px-5 py-3 text-gray-500 text-xs"><?php echo e(class_basename($media->mediable_type)); ?> #<?php echo e($media->mediable_id); ?></td>
                                <td class="px-5 py-3 text-gray-500 text-sm"><?php echo e($media->created_at->format('d M Y')); ?></td>
                                <td class="px-5 py-3 text-right">
                                    <div class="flex items-center justify-end gap-1 opacity-0 group-hover:opacity-100 media-actions">
                                        <button onclick="copyUrl('<?php echo e($url); ?>')" class="p-1.5 rounded hover:bg-gray-100 text-gray-500 hover:text-blue-600 transition" title="Copy URL">
                                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"/></svg>
                                        </button>
                                        <?php if($media->type === 'image'): ?>
                                            <a href="<?php echo e($url); ?>" target="_blank" class="p-1.5 rounded hover:bg-gray-100 text-gray-500 hover:text-green-600 transition" title="View">
                                                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>
                                            </a>
                                        <?php endif; ?>
                                        <form action="<?php echo e(route('admin.media.destroy', $media->id)); ?>" method="POST" onsubmit="return confirm('Delete <?php echo e($media->filename); ?>?')" class="inline">
                                            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                            <input type="hidden" name="mediable_type" value="<?php echo e($mediableType); ?>">
                                            <input type="hidden" name="mediable_id" value="<?php echo e($mediableId); ?>">
                                            <button type="submit" class="p-1.5 rounded hover:bg-gray-100 text-gray-500 hover:text-red-600 transition" title="Delete">
                                                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/></svg>
                                            </button>
                                        </form>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        <?php else: ?>
            <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 p-5" id="mediaGrid">
                <?php $__currentLoopData = $mediaList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php $url = Storage::disk('public')->url($media->path); ?>
                    <div class="group media-card bg-white border rounded-lg overflow-hidden hover:shadow-lg transition-shadow" data-name="<?php echo e(strtolower($media->filename)); ?>">
                        <div class="relative aspect-square bg-gray-50 overflow-hidden">
                            <?php if($media->type === 'image'): ?>
                                <img src="<?php echo e($url); ?>" alt="<?php echo e($media->filename); ?>" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300" loading="lazy">
                            <?php elseif($media->type === 'video'): ?>
                                <div class="w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-50 to-purple-100">
                                    <svg class="w-16 h-16 text-purple-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664zM21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
                                </div>
                            <?php else: ?>
                                <div class="w-full h-full flex items-center justify-center bg-gradient-to-br from-gray-50 to-gray-100">
                                    <svg class="w-16 h-16 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/></svg>
                                </div>
                            <?php endif; ?>
                            <div class="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center gap-2 opacity-0 group-hover:opacity-100">
                                <?php if($media->type === 'image'): ?>
                                    <a href="<?php echo e($url); ?>" target="_blank" class="p-2 bg-white rounded-full shadow hover:bg-gray-100 transition" title="View">
                                        <svg class="w-4 h-4 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>
                                    </a>
                                <?php endif; ?>
                                <a href="<?php echo e($url); ?>" download class="p-2 bg-white rounded-full shadow hover:bg-gray-100 transition" title="Download">
                                    <svg class="w-4 h-4 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
                                </a>
                                <button onclick="copyUrl('<?php echo e($url); ?>')" class="p-2 bg-white rounded-full shadow hover:bg-gray-100 transition" title="Copy URL">
                                    <svg class="w-4 h-4 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"/></svg>
                                </button>
                            </div>
                            <div class="absolute top-2 right-2">
                                <span class="px-2 py-0.5 rounded text-xs font-medium bg-white/80 backdrop-blur shadow-sm text-<?php echo e($mediaTypes[$media->type]['bg'] ?? 'gray'); ?>-700 capitalize"><?php echo e($media->type); ?></span>
                            </div>
                        </div>
                        <div class="p-3">
                            <p class="text-sm font-medium text-gray-900 truncate" title="<?php echo e($media->filename); ?>"><?php echo e($media->filename); ?></p>
                            <div class="flex items-center justify-between mt-1">
                                <p class="text-xs text-gray-400"><?php echo e(number_format($media->size / 1024, 1)); ?> KB</p>
                                <p class="text-xs text-gray-400"><?php echo e($media->created_at->format('d M Y')); ?></p>
                            </div>
                            <div class="flex items-center justify-between mt-1.5">
                                <span class="text-xs text-gray-400 truncate"><?php echo e(class_basename($media->mediable_type)); ?> #<?php echo e($media->mediable_id); ?></span>
                                <form action="<?php echo e(route('admin.media.destroy', $media->id)); ?>" method="POST" onsubmit="return confirm('Delete <?php echo e($media->filename); ?>?')" class="inline">
                                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                    <input type="hidden" name="mediable_type" value="<?php echo e($mediableType); ?>">
                                    <input type="hidden" name="mediable_id" value="<?php echo e($mediableId); ?>">
                                    <button type="submit" class="text-xs text-red-500 hover:text-red-700 hover:underline">Delete</button>
                                </form>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>
    </div>
</div>

<script>
function copyUrl(url) {
    navigator.clipboard.writeText(url).then(() => {
        const toast = document.createElement('div');
        toast.className = 'fixed bottom-4 right-4 bg-gray-900 text-white px-4 py-2 rounded-lg shadow-lg text-sm z-50 animate-bounce';
        toast.textContent = 'URL copied to clipboard!';
        document.body.appendChild(toast);
        setTimeout(() => toast.remove(), 2000);
    });
}

document.getElementById('mediaSearch')?.addEventListener('input', function() {
    const q = this.value.toLowerCase();
    document.querySelectorAll('#mediaGrid .media-card, #mediaList .media-row').forEach(el => {
        el.style.display = el.dataset.name.includes(q) ? '' : 'none';
    });
});
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin::layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH G:\abo bilal nuisan\bernie_store\bernie-backend\Modules/Admin\resources/views/media/index.blade.php ENDPATH**/ ?>