

<?php $__env->startSection('content'); ?>
    <div class="space-y-4">
        <h2 class="text-xl font-semibold"><?php echo e(trans('daily-spin.settings')); ?></h2>
        <div class="text-sm text-gray-400"><?php echo e(settings('server_name')); ?></div>

        <div class="dark-card p-4">
            <div class="grid grid-cols-3 gap-4 mb-4">
                <div class="bg-gray-800 p-4 rounded">
                    <div class="text-sm text-gray-400"><?php echo e(trans('daily-spin.todays_spins')); ?></div>
                    <div class="text-2xl font-semibold"><?php echo e($todaySpins); ?></div>
                </div>
                <div class="bg-gray-800 p-4 rounded">
                    <div class="text-sm text-gray-400"><?php echo e(trans('daily-spin.todays_rewards')); ?></div>
                    <div class="text-2xl font-semibold"><?php echo e($todayRewards); ?></div>
                </div>
                <div class="bg-gray-800 p-4 rounded">
                    <div class="text-sm text-gray-400"><?php echo e(trans('daily-spin.total_spins')); ?></div>
                    <div class="text-2xl font-semibold"><?php echo e($totalSpins); ?></div>
                </div>
            </div>

            <div class="mb-4">
                <h3 class="font-semibold"><?php echo e(trans('daily-spin.recent_spins')); ?></h3>
                <div class="mt-2 space-y-2">
                    <?php $__empty_1 = true; foreach($recentSpins as $spin): $__empty_1 = false; ?>
                        <div class="flex items-center justify-between bg-gray-900 p-3 rounded">
                            <div>
                                <div class="font-semibold"><?php echo e($spin->username); ?></div>
                                <div class="text-sm text-gray-400"><?php echo e($spin->created_at); ?></div>
                            </div>
                            <div class="text-right">
                                <div class="text-lg font-semibold"><?php echo e($spin->reward_amount); ?></div>
                            </div>
                        </div>
                    <?php endforeach; if ($__empty_1): ?>
                        <div class="text-sm text-gray-500"><?php echo e(trans('daily-spin.no_recent_spins')); ?></div>
                    <?php endif; ?>
                </div>
            </div>

            <form action="<?php echo e(url('admin/daily-spin/settings')); ?>" method="post" class="space-y-4">
                <?php echo csrf_field(); ?>


                <div class="grid grid-cols-2 gap-4">
                    <div>
                        <label class="block text-sm text-gray-300"><?php echo e(trans('daily-spin.enabled')); ?></label>
                        <select name="daily_spin_enabled" class="mt-1 block w-48 bg-gray-800 border border-gray-700 rounded-md px-3 py-2 text-gray-200">
                            <option value="1" <?php echo e(settings('daily_spin_enabled') ? 'selected' : ''); ?>><?php echo e(trans('daily-spin.enabled')); ?></option>
                            <option value="0" <?php echo e(!settings('daily_spin_enabled') ? 'selected' : ''); ?>><?php echo e(trans('daily-spin.disabled')); ?></option>
                        </select>
                    </div>

                    <div>
                        <label class="block text-sm text-gray-300"><?php echo e(trans('daily-spin.currency_name')); ?></label>
                        <input name="currency_name" type="text" value="<?php echo e(old('currency_name', settings('currency_name'))); ?>" class="mt-1 block w-48 bg-gray-800 border border-gray-700 rounded-md px-3 py-2 text-gray-200">
                    </div>

                    <div>
                        <label class="block text-sm text-gray-300"><?php echo e(trans('daily-spin.min_reward')); ?></label>
                        <input name="daily_spin_min_reward" type="number" min="1" value="<?php echo e(old('daily_spin_min_reward', settings('daily_spin_min_reward'))); ?>" class="mt-1 block w-48 bg-gray-800 border border-gray-700 rounded-md px-3 py-2 text-gray-200">
                    </div>

                    <div>
                        <label class="block text-sm text-gray-300"><?php echo e(trans('daily-spin.max_reward')); ?></label>
                        <input name="daily_spin_max_reward" type="number" min="1" value="<?php echo e(old('daily_spin_max_reward', settings('daily_spin_max_reward'))); ?>" class="mt-1 block w-48 bg-gray-800 border border-gray-700 rounded-md px-3 py-2 text-gray-200">
                    </div>
                </div>

                <div class="flex justify-end">
                    <button type="submit" class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white rounded"><?php echo e(trans('daily-spin.save_settings')); ?></button>
                </div>
            </form>
        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>