<ul class="list-group list-group-flush">

    <?php $__currentLoopData = $links; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $link): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <li class="list-group-item d-flex flex-wrap gap-1 px-0 flex-column">
            <span class="fw-semibold"><?php echo e($link->name); ?> <a href="<?php echo e(url($link->uri)); ?>" title="<?php echo app('translator')->get('Open Link'); ?>" class="ms-1 text-primary fw-normal" target="blank"><i class="la la-external-link"></i></a></span>

            <div>
                <span class="text--primary"><?php echo e($link->uri); ?></span>
                <button class="copy-btn ms-1 bg-transparent text-muted" data-uri="<?php echo e($link->uri); ?>">
                    <i class="la la-copy"></i>
                </button>
                <small class="copied-text bg-dark px-1 text-white ms-2 d-none rounded"><?php echo app('translator')->get('Copied'); ?></small>
            </div>
        </li>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>

<?php $__env->startPush('script'); ?>
    <script>
        (function($) {
            "use strict";
            document.addEventListener('DOMContentLoaded', function() {
                const copyButtons = document.querySelectorAll('.copy-btn');
                copyButtons.forEach(button => {
                    button.addEventListener('click', function() {
                        const uri = this.dataset.uri;
                        button.classList.add('d-none');
                        const copiedText = this.nextElementSibling;

                        copiedText.classList.remove('d-none');
                        navigator.clipboard.writeText(uri).then(() => {
                            setTimeout(() => {
                                copiedText.classList.add('d-none');
                                button.classList.remove('d-none');
                            }, 500);
                        }).catch(err => {
                            console.error('Failed to copy text: ', err);
                        });
                    });
                });
            });
        })(jQuery);
    </script>
<?php $__env->stopPush(); ?>
<?php /**PATH /home/creativedesignbd/ecommerce7.creativedesign.com.bd/core/resources/views/admin/menu_builder/links.blade.php ENDPATH**/ ?>