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

<?php $__env->startSection('breadcrumb'); ?>
    <div class="container-fluid px-4">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb my-0">
                <li class="breadcrumb-item"><a href="<?php echo e(route('admin.dashboard.index')); ?>">Anasayfa</a></li>
                <li class="breadcrumb-item"><a href="<?php echo e(route('admin.navigation.menu.index')); ?>">Navigasyon</a></li>
                <li class="breadcrumb-item active"><span><?php echo e($navigationMenu->name); ?></span></li>
            </ol>
        </nav>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

    <div class="container-lg px-4">

        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('link.create')): ?>
            <div class="row mb-4">
                <div class="d-flex justify-content-end">
                    <div class="btn-group" role="group">
                        <button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-coreui-toggle="dropdown"
                            aria-expanded="false">
                            <span class="cil-plus"></span>
                            Yeni Link
                        </button>
                        <ul class="dropdown-menu">
                            <li><a class="dropdown-item"
                                    href="<?php echo e(route('admin.navigation.link.create', $navigationMenu->id)); ?>?type=url">URL</a>
                            </li>
                            <li><a class="dropdown-item"
                                    href="<?php echo e(route('admin.navigation.link.create', $navigationMenu->id)); ?>?type=page">Sayfa</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        <?php endif; ?>

        <div class="row">
            <div class="col-12">
                <div class="card mb-4">
                    <?php
$__split = function ($name, $params = []) {
    return [$name, $params];
};
[$__name, $__params] = $__split('admin.navigation.link.index', ['navigationMenu' => $navigationMenu]);

$__html = app('livewire')->mount($__name, $__params, 'lw-1910096722-0', $__slots ?? [], get_defined_vars());

echo $__html;

unset($__html);
unset($__name);
unset($__params);
unset($__split);
if (isset($__slots)) unset($__slots);
?>
                </div>
            </div>
        </div>
    </div>

<?php $__env->startSection('css'); ?>
    <link href="<?php echo e(URL::to('admin/vendors/@coreui/icons/css/free.min.css')); ?>" rel="stylesheet">
    <?php echo \Livewire\Mechanisms\FrontendAssets\FrontendAssets::styles(); ?>

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

<?php $__env->startSection('js'); ?>
<?php echo \Livewire\Mechanisms\FrontendAssets\FrontendAssets::scripts(); ?>

<script src="https://cdn.jsdelivr.net/gh/livewire/sortable@v1.x.x/dist/livewire-sortable.js"></script>

    <script>
        const toastConfig = {
            toast: true,
            position: 'top-end',
            showConfirmButton: false,
            timer: 2000,
            timerProgressBar: true,
        };

        document.addEventListener('livewire:init', () => {
            Livewire.on('deleteTriggered', (event) => {
                swal.fire({
                    title: 'Emin misiniz?',
                    text: 'Bu linke ve linke ait tüm alt linkler silinecektir ve bu işlem geri alınamaz!',
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonText: 'Evet, sil!',
                    cancelButtonText: 'Vazgeç'
                }).then((result) => {
                    if (result.isConfirmed) {
                        Livewire.dispatch('delete', {
                            id: event.id
                        });
                    }
                });
            });

            Livewire.on('showAlert', (event) => {
                Swal.fire({
                    ...toastConfig,
                    text: event[0].text,
                    icon: event[0].icon,
                });
            });
        });
    </script>
<?php $__env->stopSection(); ?>

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

<?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/furkanciloglu/Herd/impoholdingpanel/resources/views/admin/navigation/link/index.blade.php ENDPATH**/ ?>