

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="row">
        <div class="col-lg-12 col-md-12 col-12">
            <div class="d-flex justify-content-between align-items-center">
                <div class="mb-2 mb-lg-0">
                    <h3 class="mb-0 text-white">Contact Info</h3>
                </div>
                <?php if(!$contactInfo): ?>
                <div>
                    <a href="<?php echo e(route('contact-info.create')); ?>" class="btn btn-white">Create</a>
                </div>
                <?php endif; ?>
            </div>
        </div>
        <div class="col-lg-12 mt-4">
            <?php if(session('success')): ?>
                <div class="alert alert-success"><?php echo e(session('success')); ?></div>
            <?php endif; ?>
        
            <?php if($contactInfo): ?>
                <table class="table table-bordered bg-white">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Phone</th>
                            <th>Email</th>
                            <th>Address</th>
                            <th>Social</th>
                            <th>Logo</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?php echo e($contactInfo->id); ?></td>
                            <td><?php echo e($contactInfo->phone); ?></td>
                            <td><?php echo e($contactInfo->email); ?></td>
                            <td><?php echo e($contactInfo->address); ?></td>
                            <td>
                                <?php if($contactInfo->facebook): ?>
                                    <a href="<?php echo e($contactInfo->facebook); ?>" target="_blank">Facebook</a><br>
                                <?php endif; ?>
                                <?php if($contactInfo->instagram): ?>
                                    <a href="<?php echo e($contactInfo->instagram); ?>" target="_blank">Instagram</a><br>
                                <?php endif; ?>
                                <?php if($contactInfo->twitter): ?>
                                    <a href="<?php echo e($contactInfo->twitter); ?>" target="_blank">Twitter</a><br>
                                <?php endif; ?>
                                <?php if($contactInfo->linkedin): ?>
                                    <a href="<?php echo e($contactInfo->linkedin); ?>" target="_blank">LinkedIn</a>
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if($contactInfo->logo): ?>
                                    <img src="<?php echo e(asset($contactInfo->logo)); ?>" alt="Logo" width="100">
                                <?php else: ?>
                                    No Logo
                                <?php endif; ?>
                            </td>
                            <td class="d-flex gap-1">
                                <a href="<?php echo e(route('contact-info.edit', $contactInfo->id)); ?>" class="btn btn-warning btn-sm">Edit</a>
                                <form action="<?php echo e(route('contact-info.destroy', $contactInfo->id)); ?>" method="POST" style="display:inline-block;">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete this contact info?')">Delete</button>
                                </form>
                            </td>
                        </tr>
                    </tbody>
                </table>
            <?php else: ?>
                <div class="alert alert-info">
                    No contact information found. <a href="<?php echo e(route('contact-info.create')); ?>" class="alert-link">Click here to create new contact information</a>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.admin-dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/pataneye/public_html/resources/views/admin/pages/contact-info/index.blade.php ENDPATH**/ ?>