<?php $__env->startSection('title',__('Edit Menu Category')); ?>
<?php $__env->startPush('css'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('/assets/admin/plugins/src/image-uploader/uploader.css')); ?>">
<?php $__env->stopPush(); ?>
<?php $__env->startSection('content'); ?>
    <style>
        .form-control{
            border-radius: 10px;
            border: 1px solid #7b7bff;
            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;        }
        .form-label{
            font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
        }
        .form-select{
            background-image: none !important;
        }
        .layout-top-spacing{
            margin: 20px;
            border-radius: 15px;
            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
        }
        /* Ümumi container üçün stil */
.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Label üçün stil */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Select box üçün stil */
.tom-select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tom-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Select elementinin genişliyini təyin etmək üçün */
.w-full {
    width: 100%;
}

/* Option elementləri üçün stil */
select option {
    padding: 0.5rem;
}

/* Mobil cihazlar üçün uyğunluq */
@media (max-width: 768px) {
    .tom-select {
        font-size: 0.9rem;
        padding: 0.4rem;
    }
}

    </style>
    <br><br><br>
    <div class="card layout-top-spacing">
        <div class="card-body">
            <div class="page-title-container">
                <div class="row">
                    <div class="col-12 col-md-7">
                        <h1 class="mb-0 pb-0 display-4" id="title"><?php echo app('translator')->get('Edit Menu Category'); ?></h1>
                        <nav class="breadcrumb-container d-inline-block" aria-label="breadcrumb">
                                <ul class="breadcrumb pt-0">
                                        <li class="breadcrumb-item"><a href="<?php echo e(route('admin:home')); ?>"><?php echo app('translator')->get('Home'); ?></a></li>
                                        <li class="breadcrumb-item"><a href="<?php echo e(route('admin:menuCategories.index')); ?>"><?php echo app('translator')->get('Menu Categories'); ?></a></li>
                                        <li class="breadcrumb-item"><a href="#"><?php echo app('translator')->get('Edit Menu Category'); ?></a></li>
                                </ul>
                        </nav>
                    </div>

                    <div class="col-12 col-md-5 d-flex align-items-start justify-content-end">
                        <a href="<?php echo e(route('admin:menuCategories.index')); ?>">
                            <button type="button" class="btn btn-outline-primary btn-icon btn-icon-start w-100 w-md-auto">
                                <i data-acorn-icon="arrow-left" class="me-2" data-acorn-size="17"></i>
                                <span><?php echo app('translator')->get('Back'); ?></span>
                            </button>
                        </a>
                    </div>
                </div>
            </div>
            <form class="<?php echo \Illuminate\Support\Arr::toCssClasses(["row needs-validation","was-validated" => $errors->any()]); ?>" action="<?php echo e(route('admin:menuCategories.update',$menuCategory->getAttribute('id'))); ?>" method="post" novalidate enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>

            <div class="col-12 p-0 p-md-3 d-flex flex-wrap flex-md-nowrap justify-content-center justify-content-md-start align-items-center">

                <div class="row w-100 my-auto">

                    <div class="row">
                        <div class="col-lg-3 col-sm-12 p-0 p-md-3 d-flex flex-wrap flex-md-nowrap justify-content-center justify-content-md-start align-items-center">
                                <div class="me-md-5" id="imageContainer">
                                    <img style="height: 224px; width: 427px; object-fit: contain; cursor:pointer;" src="<?php echo e($menuCategory->image()); ?>" class="img-thumbnail" alt="<?php echo e($menuCategory->menu_category()); ?>" onclick="document.getElementById('fileInput').click()">
                                </div>
                                <!-- Hidden file input -->
                                <input id="fileInput" type="file" style="display:none;" name="image">
                        </div>
                    </div>

                    <?php if (isset($component)) { $__componentOriginald8da589641248edb875bf26e0082aa53 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald8da589641248edb875bf26e0082aa53 = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Input::resolve(['label' => __('Menu Category Az'),'name' => 'menu_category_az','customDivClass' => 'col-12 col-lg-4','value' => old('menu_category_az',$menuCategory->getAttribute('menu_category_az')),'required' => true] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $attributes = $__attributesOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__attributesOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $component = $__componentOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__componentOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>

                    <?php if (isset($component)) { $__componentOriginald8da589641248edb875bf26e0082aa53 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald8da589641248edb875bf26e0082aa53 = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Input::resolve(['label' => __('Menu Category Ru'),'name' => 'menu_category_ru','customDivClass' => 'col-12 col-lg-4','value' => old('menu_category_ru',$menuCategory->getAttribute('menu_category_ru')),'required' => true] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $attributes = $__attributesOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__attributesOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $component = $__componentOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__componentOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>

                    <?php if (isset($component)) { $__componentOriginald8da589641248edb875bf26e0082aa53 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald8da589641248edb875bf26e0082aa53 = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Input::resolve(['label' => __('Menu Category En'),'name' => 'menu_category_en','customDivClass' => 'col-12 col-lg-4','value' => old('menu_category_en',$menuCategory->getAttribute('menu_category_en')),'required' => true] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $attributes = $__attributesOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__attributesOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $component = $__componentOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__componentOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>

                    <?php
                        $viewOptions = [
                            '1' => 'Active',
                            '2' => 'Deactive',
                        ];
                    ?>

                    <?php if (isset($component)) { $__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Select::resolve(['label' => __('Active or Deactive'),'name' => 'position','customDivClass' => 'col-12 col-lg-5','selected' => old('position',$menuCategory->getAttribute('position')),'options' => $viewOptions] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Select::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['nullable' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac)): ?>
<?php $attributes = $__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac; ?>
<?php unset($__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac)): ?>
<?php $component = $__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac; ?>
<?php unset($__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac); ?>
<?php endif; ?>

                    <?php
                        $viewOptions = [
                            'Caspian' => 'Eat',
                            'Cresent' => 'Drink',
                            'Breakfast' => 'Breakfast',
                        ];
                    ?>

                    <?php if (isset($component)) { $__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Select::resolve(['label' => __('Select Page'),'name' => 'option','customDivClass' => 'col-12 col-lg-5','selected' => old('option',$menuCategory->getAttribute('option')),'required' => true,'options' => $viewOptions] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Select::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac)): ?>
<?php $attributes = $__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac; ?>
<?php unset($__attributesOriginal7b099f880a33b5fbbd5df8fd87ae25ac); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac)): ?>
<?php $component = $__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac; ?>
<?php unset($__componentOriginal7b099f880a33b5fbbd5df8fd87ae25ac); ?>
<?php endif; ?>

                    <?php if (isset($component)) { $__componentOriginald8da589641248edb875bf26e0082aa53 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald8da589641248edb875bf26e0082aa53 = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\Input::resolve(['label' => __('Place Number'),'name' => 'number','customDivClass' => 'col-12 col-lg-2','value' => old('number',$menuCategory->getAttribute('number'))] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['nullable' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $attributes = $__attributesOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__attributesOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald8da589641248edb875bf26e0082aa53)): ?>
<?php $component = $__componentOriginald8da589641248edb875bf26e0082aa53; ?>
<?php unset($__componentOriginald8da589641248edb875bf26e0082aa53); ?>
<?php endif; ?>




                    <div class="mt-3">
                        <label><?php echo app('translator')->get('Select Main Category'); ?></label>
                        <div class="mb-3">
                            <select name="menu_parent" class="tom-select w-full">
                                <option value=""> <?php echo app('translator')->get('Select main category'); ?> </option>
                                <?php $__currentLoopData = $menuCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $menuCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php if(old('menu_parent')): echo 'selected'; endif; ?> value="<?php echo e($menuCategory->getAttribute('id')); ?>"> <?php echo e($menuCategory->menu_category()); ?> </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>


                </div>
            </div>
                <?php if (isset($component)) { $__componentOriginal27adbb1ef2223bb0b019da2982a3e879 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal27adbb1ef2223bb0b019da2982a3e879 = $attributes; } ?>
<?php $component = App\View\Components\Admin\Form\SubmitButton::resolve(['buttonText' => 'Update'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form.submit-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Admin\Form\SubmitButton::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal27adbb1ef2223bb0b019da2982a3e879)): ?>
<?php $attributes = $__attributesOriginal27adbb1ef2223bb0b019da2982a3e879; ?>
<?php unset($__attributesOriginal27adbb1ef2223bb0b019da2982a3e879); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal27adbb1ef2223bb0b019da2982a3e879)): ?>
<?php $component = $__componentOriginal27adbb1ef2223bb0b019da2982a3e879; ?>
<?php unset($__componentOriginal27adbb1ef2223bb0b019da2982a3e879); ?>
<?php endif; ?>
            </form>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
    <script src="<?php echo e(asset('/assets/admin/plugins/src/image-uploader/uploader.js')); ?>"></script>

    <script src="<?php echo e(asset('/assets/admin/plugins/src/tinymce/tinymce.min.js')); ?>"></script>
    <script>
        let tinyDarkActive = JSON.parse(localStorage.getItem("theme")).settings.layout.darkMode;
        tinymce.init({
            selector: 'textarea',
            plugins: [
                'advlist', 'autolink', 'link', 'image', 'lists', 'charmap', 'preview', 'anchor', 'pagebreak',
                'searchreplace', 'wordcount', 'visualblocks', 'visualchars', 'code', 'fullscreen', 'insertdatetime',
                'media', 'table', 'emoticons', 'help'
            ],
            skin: tinyDarkActive ? "oxide-dark" : null,
            content_css: tinyDarkActive ? "dark" : null,
            <?php if(in_array(app()->getLocale(),['az','ru'])): ?>
            language: '<?php echo e(app()->getLocale()); ?>'
            <?php endif; ?>
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('app.admin.layout.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/menyum/durrem.menyum.az/resources/views/app/admin/pages/menuCategories/edit-menuCategory.blade.php ENDPATH**/ ?>