
<?php $__env->startSection('title', 'Databases | ' . $order->name); ?>

<?php if(settings('encrypted::pterodactyl::api_admin_key', false)): ?>
    <?php ($create_allowed = count($databases) < $server['feature_limits']['databases']); ?>
    <?php $__env->startSection('content'); ?>
        <div class="container mx-auto ">
            <div class="relative overflow-x-auto overflow-y-auto shadow-md sm:rounded-lg" style="height: 80vh;">
                <table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
                    <thead class="dark:bg-gray-700">
                    <tr>
                        <th class="px-4 py-2 text-left text-gray-600 dark:text-gray-300 whitespace-nowrap">
                            <?php echo __('client.databases'); ?> <?php echo e(count($databases)); ?>/<?php echo e($server['feature_limits']['databases']); ?></th>
                        <th class="px-4 py-2 text-left text-gray-600 dark:text-gray-300 whitespace-nowrap"><?php echo __('client.endpoint'); ?></th>
                        <th class="px-4 py-2 text-left text-gray-600 dark:text-gray-300 text-end whitespace-nowrap">
                            <button type="submit" data-modal-target="create-modal" data-modal-toggle="create-modal"
                                    class="bg-green-500 hover:bg-green-700 text-white font-bold py-0.5 px-2 text-sm rounded"
                                    <?php if(!$create_allowed): ?> disabled <?php endif; ?>>
                                <?php echo __('admin.create'); ?>

                            </button>
                        </th>
                    </tr>
                    </thead>
                    <tbody class="bg-white dark:bg-gray-600">
                    <?php $__currentLoopData = $databases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $database): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="border-b dark:border-gray-700">
                            <td class="px-4 py-2 dark:text-gray-300 whitespace-nowrap"><?php echo e($database['attributes']['name']); ?></td>
                            <td class="px-4 py-2 dark:text-gray-300 whitespace-nowrap"><?php echo e($database['attributes']['host']['address'].':'.$database['attributes']['host']['port']); ?></td>
                            <td class="px-4 py-2 text-end">
                                <button data-modal-target="view-modal<?php echo e($database['attributes']['id']); ?>"
                                        data-modal-toggle="view-modal<?php echo e($database['attributes']['id']); ?>"
                                        class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-2 text-sm rounded mr-1">
                                    <?php echo __('admin.view'); ?>

                                </button>
                                <button data-modal-target="confirm-modal<?php echo e($database['attributes']['id']); ?>"
                                        data-modal-toggle="confirm-modal<?php echo e($database['attributes']['id']); ?>"
                                        class="bg-red-500 hover:bg-red-700 text-white font-bold py-1 px-2 text-sm rounded">
                                    <?php echo __('admin.delete'); ?>

                                </button>
                            </td>
                        </tr>
                        <?php echo $__env->make(Theme::serviceView('pterodactyl','modals.view-database'), ['database' => $database], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        <?php echo $__env->make(Theme::serviceView('pterodactyl','modals.confirm-delete-database'), ['database' => $database], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>

        <?php echo $__env->make(Theme::serviceView('pterodactyl','modals.create-database'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php $__env->stopSection(); ?>
<?php endif; ?>

<?php echo $__env->make(Theme::path('orders.master'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/wemx/app/Services/Pterodactyl/Resources/views/client/tailwind/databases.blade.php ENDPATH**/ ?>